2370 lines
77 KiB
HTML
2370 lines
77 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-us" dir="ltr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="
|
|
obiannotate: edit sequence annotations
|
|
#
|
|
|
|
|
|
Description
|
|
#
|
|
|
|
obiannotate is a tool for editing the sequence records of a dataset. It allows you to add, delete or modify annotations of sequence records, as well as edit the identifier, definition or sequence itself.
|
|
There are two particularly important groups of options in
|
|
obiannotate
|
|
. The first group is shared with
|
|
obigrep
|
|
and enables the selection of sequences. The second group specifies the changes to be made to the sequence records. In
|
|
obigrep
|
|
, the selection options determine which sequences the program will retain in its output. In contrast, every sequence in the input dataset is included in the result produced by
|
|
obiannotate
|
|
; however, only the sequences selected by the selection options are modified according to the editing options. Non-selected sequences are transferred to the result without modification.">
|
|
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
|
|
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#343a40">
|
|
<meta name="color-scheme" content="light dark"><meta property="og:url" content="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<meta property="og:site_name" content="OBITools4 documentation">
|
|
<meta property="og:title" content="obiannotate">
|
|
<meta property="og:description" content="obiannotate: edit sequence annotations # Description # obiannotate is a tool for editing the sequence records of a dataset. It allows you to add, delete or modify annotations of sequence records, as well as edit the identifier, definition or sequence itself.
|
|
There are two particularly important groups of options in obiannotate . The first group is shared with obigrep and enables the selection of sequences. The second group specifies the changes to be made to the sequence records. In obigrep , the selection options determine which sequences the program will retain in its output. In contrast, every sequence in the input dataset is included in the result produced by obiannotate ; however, only the sequences selected by the selection options are modified according to the editing options. Non-selected sequences are transferred to the result without modification.">
|
|
<meta property="og:locale" content="en_us">
|
|
<meta property="og:type" content="website">
|
|
<title>obiannotate | OBITools4 documentation</title>
|
|
<link rel="icon" href="/obidoc/favicon.png" >
|
|
<link rel="manifest" href="/obidoc/manifest.json">
|
|
<link rel="canonical" href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<link rel="stylesheet" href="/obidoc/book.min.5fd7b8e2d1c0ae15da279c52ff32731130386f71b58f011468f20d0056fe6b78.css" integrity="sha256-X9e44tHArhXaJ5xS/zJzETA4b3G1jwEUaPINAFb+a3g=" crossorigin="anonymous">
|
|
<script defer src="/obidoc/fuse.min.js"></script>
|
|
<script defer src="/obidoc/en.search.min.4da51bdd2d833922fdbc0e19df517221387fc625ffb68ee140d605b3c5b68058.js" integrity="sha256-TaUb3S2DOSL9vA4Z31FyITh/xiX/to7hQNYFs8W2gFg=" crossorigin="anonymous"></script>
|
|
|
|
<script defer src="/obidoc/sw.min.32af8eafce4180aa1c5dea66d99fb26ba9043ea7c7a4c706138c91d9051b285e.js" integrity="sha256-Mq+Or85BgKocXepm2Z+ya6kEPqfHpMcGE4yR2QUbKF4=" crossorigin="anonymous"></script>
|
|
<link rel="alternate" type="application/rss+xml" href="http://metabar:8888/obidoc/obitools/obiannotate/index.xml" title="OBITools4 documentation" />
|
|
<!--
|
|
Made with Book Theme
|
|
https://github.com/alex-shpak/hugo-book
|
|
-->
|
|
<link rel="stylesheet" type="text/css" href="http://metabar:8888/obidoc/hugo-cite.css" />
|
|
</head>
|
|
<body dir="ltr">
|
|
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
|
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
|
<main class="container flex">
|
|
<aside class="book-menu">
|
|
<div class="book-menu-content">
|
|
|
|
<nav>
|
|
<h2 class="book-brand">
|
|
<a class="flex align-center" href="/obidoc/"><img src="/obidoc/obitools_logo.jpg" alt="Logo" class="book-icon" /><span>OBITools4 documentation</span>
|
|
</a>
|
|
</h2>
|
|
|
|
|
|
<div class="book-search hidden">
|
|
<input type="text" id="book-search-input" placeholder="Search" aria-label="Search" maxlength="64" data-hotkeys="s/" />
|
|
<div class="book-search-spinner hidden"></div>
|
|
<ul id="book-search-results"></ul>
|
|
</div>
|
|
<script>document.querySelector(".book-search").classList.remove("hidden")</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<span>Docs</span>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/about/" class="">About</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/installation/" class="">Installation</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/principles/" class="">General operating principles</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-08756b4c1f14be6ee584ece005b9f621" class="toggle" />
|
|
<label for="section-08756b4c1f14be6ee584ece005b9f621" class="flex justify-between">
|
|
<a role="button" class="">File formats</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-933c2e64b905b84e22aa5273cea2d0bd" class="toggle" />
|
|
<label for="section-933c2e64b905b84e22aa5273cea2d0bd" class="flex justify-between">
|
|
<a role="button" class="">Sequence file formats</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/formats/fasta/" class="">FASTA file format</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/formats/fastq/" class="">FASTQ file format</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/formats/genbank/" class="">GenBank Flat File format</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/formats/embl/" class="">EMBL Flat File format</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/file_format/sequence_files/csv/" class="">CSV format</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/formats/json/" class="">JSON format</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/file_format/sequence_files/annotations/" class="">Annotation of sequences</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-0258ae1c222f9a38cc1b75254c93b0f4" class="toggle" />
|
|
<label for="section-0258ae1c222f9a38cc1b75254c93b0f4" class="flex justify-between">
|
|
<a role="button" class="">Taxonomy file formats</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/file_format/taxonomy_file/csv_taxdump/" class="">CSV formatted taxdump</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/file_format/taxonomy_file/ncbi_taxdump/" class="">NCBI taxdump</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/formats/csv/" class="">The CSV format</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-70b1e6e5ec7f3ccab643155fa50659b6" class="toggle" />
|
|
<label for="section-70b1e6e5ec7f3ccab643155fa50659b6" class="flex justify-between">
|
|
<a role="button" class="">Patterns</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/patterns/regular/" class="">Regular Expressions</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/patterns/dnagrep/" class="">DNA Patterns</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-8223f464911a1fe6c655972143684e93" class="toggle" checked />
|
|
<label for="section-8223f464911a1fe6c655972143684e93" class="flex justify-between">
|
|
<a role="button" class="">The OBITools4 commands</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/commands/options/" class="">Shared command options</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-8921ea65523c266b128dd4263232b0fc" class="toggle" checked />
|
|
<label for="section-8921ea65523c266b128dd4263232b0fc" class="flex justify-between">
|
|
<a role="button" class="">Basics</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obiannotate/" class="active">obiannotate</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obicomplement/" class="">obicomplement</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obiconvert/" class="">obiconvert</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obicount/" class="">obicount</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obicsv/" class="">obicsv</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obidemerge/" class="">obidemerge</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obidistribute/" class="">obidistribute</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obigrep/" class="">obigrep</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obijoin/" class="">obijoin</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obimatrix/" class="">obimatrix</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obisplit/" class="">obisplit</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obisummary/" class="">obisummary</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obiuniq/" class="">obiuniq</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-dbdf1bb5377572439394e60e08c30f50" class="toggle" />
|
|
<label for="section-dbdf1bb5377572439394e60e08c30f50" class="flex justify-between">
|
|
<a role="button" class="">Demultiplexing samples</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obimultiplex/" class="">obimultiplex</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obitagpcr/" class="">obitagpcr</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-aa98fedd067b51150db59691a8ea8edd" class="toggle" />
|
|
<label for="section-aa98fedd067b51150db59691a8ea8edd" class="flex justify-between">
|
|
<a role="button" class="">Sequence alignments</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obiclean/" class="">obiclean</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-7433746525d8c2b29b033f765c869acd" class="toggle" />
|
|
<label for="section-7433746525d8c2b29b033f765c869acd" class="flex justify-between">
|
|
<a href="/obidoc/obitools/obipairing/" class="">obipairing</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/commands/alignments/obipairing/fasta-like/" class="">The FASTA-like alignment</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/commands/alignments/obipairing/exact-alignment/" class="">Exact alignment</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obipcr/" class="">obipcr</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obirefidx/" class="">obirefidx</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obitag/" class="">obitag</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-5746f699d10490780dec8e30ab2dd3ce" class="toggle" />
|
|
<label for="section-5746f699d10490780dec8e30ab2dd3ce" class="flex justify-between">
|
|
<a role="button" class="">Taxonomy</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obitaxonomy/" class="">obitaxonomy</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-3f50c4fe7ab436a56ae92897d5444956" class="toggle" />
|
|
<label for="section-3f50c4fe7ab436a56ae92897d5444956" class="flex justify-between">
|
|
<a role="button" class="">Advanced tools</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obiscript/" class="">obiscript</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-549be3934679fcb82a232f6bd5435563" class="toggle" />
|
|
<label for="section-549be3934679fcb82a232f6bd5435563" class="flex justify-between">
|
|
<a role="button" class="">Others</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obimicrosat/" class="">obimicrosat</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-ceca4455173761e30cbc0a6dc2327167" class="toggle" />
|
|
<label for="section-ceca4455173761e30cbc0a6dc2327167" class="flex justify-between">
|
|
<a role="button" class="">Experimentals</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obicleandb/" class="">obicleandb</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obiconsensus/" class="">obiconsensus</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/obitools/obilandmark/" class="">obilandmark</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/commands/tags/" class="">Glossary of tags</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-9b1bcd52530c59dc4819b1f61c128f54" class="toggle" />
|
|
<label for="section-9b1bcd52530c59dc4819b1f61c128f54" class="flex justify-between">
|
|
<a role="button" class="">Cookbook</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/cookbook/illumina/" class="">Analysing an Illumina data set</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/cookbook/ecoprimers/" class="">Designing new barcodes</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/cookbook/local_genbank/" class="">Prepare a local copy of Genbank</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/cookbook/reference_db/" class="">Build a reference database</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/cookbook/minion/" class="">Oxford Nanopore data analysis</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<span>Programming OBITools</span>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/programming/expression/" class="">Expression language</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-6d580829a667b5cca790b286d99a10fe" class="toggle" />
|
|
<label for="section-6d580829a667b5cca790b286d99a10fe" class="flex justify-between">
|
|
<a href="/obidoc/docs/programming/lua/" class="">Lua: for scripting OBITools</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<input type="checkbox" id="section-2fb081dac812d624eea5f4268fca9e26" class="toggle" />
|
|
<label for="section-2fb081dac812d624eea5f4268fca9e26" class="flex justify-between">
|
|
<a role="button" class="">Obitools Classes</a>
|
|
</label>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/programming/lua/obitools_classes/biosequence/" class="">BioSequence</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/programming/lua/obitools_classes/biosequenceslice/" class="">BioSequenceSlice</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/programming/lua/obitools_classes/taxonomy/" class="">Taxonomy</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/programming/lua/obitools_classes/taxon/" class="">Taxon</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/obidoc/docs/programming/lua/obitools_classes/mutex/" class="">Mutex</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
<div class="book-page">
|
|
<header class="book-header">
|
|
|
|
<div class="flex align-center justify-between">
|
|
<label for="menu-control">
|
|
<img src="/obidoc/svg/menu.svg" class="book-icon" alt="Menu" />
|
|
</label>
|
|
|
|
<h3>obiannotate</h3>
|
|
|
|
<label for="toc-control">
|
|
|
|
<img src="/obidoc/svg/toc.svg" class="book-icon" alt="Table of Contents" />
|
|
|
|
</label>
|
|
</div>
|
|
|
|
|
|
|
|
<aside class="hidden clearfix">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#obiannotate-edit-sequence-annotations"><code>obiannotate</code>: edit sequence annotations</a>
|
|
<ul>
|
|
<li><a href="#description">Description</a>
|
|
<ul>
|
|
<li><a href="#the-selection-options">The selection options</a></li>
|
|
<li><a href="#the-edition-options">The edition options</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#synopsis">Synopsis</a></li>
|
|
<li><a href="#options">Options</a>
|
|
<ul>
|
|
<li></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#examples">Examples</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<article class="markdown book-article"><h1 id="obiannotate-edit-sequence-annotations">
|
|
<code>obiannotate</code>: edit sequence annotations
|
|
<a class="anchor" href="#obiannotate-edit-sequence-annotations">#</a>
|
|
</h1>
|
|
<h2 id="description">
|
|
Description
|
|
<a class="anchor" href="#description">#</a>
|
|
</h2>
|
|
<p><code>obiannotate</code> is a tool for editing the sequence records of a dataset. It allows you to add, delete or modify annotations of sequence records, as well as edit the identifier, definition or sequence itself.</p>
|
|
<p>There are two particularly important groups of options in <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a>. The first group is shared with <a href="http://metabar:8888/obidoc/obitools/obigrep/">
|
|
<abbr title="obigrep: filter a sequence file"><code>obigrep</code></abbr>
|
|
</a> and enables the selection of sequences. The second group specifies the changes to be made to the sequence records. In <a href="http://metabar:8888/obidoc/obitools/obigrep/">
|
|
<abbr title="obigrep: filter a sequence file"><code>obigrep</code></abbr>
|
|
</a>, the selection options determine which sequences the program will retain in its output. In contrast, every sequence in the input dataset is included in the result produced by <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a>; however, only the sequences selected by the selection options are modified according to the editing options. Non-selected sequences are transferred to the result without modification.</p>
|
|
<h3 id="the-selection-options">
|
|
The selection options
|
|
<a class="anchor" href="#the-selection-options">#</a>
|
|
</h3>
|
|
<h3 id="the-edition-options">
|
|
The edition options
|
|
<a class="anchor" href="#the-edition-options">#</a>
|
|
</h3>
|
|
<h4 id="edition-of-the-annotations">
|
|
Edition of the annotations
|
|
<a class="anchor" href="#edition-of-the-annotations">#</a>
|
|
</h4>
|
|
<p><em>OBITools4</em> store annotations attached to each sequence using a <em>tag</em>/<em>value</em> mechanism. The annotation of a sequence if a set of <em>tags</em> each of them being associated to a value. Therefor, annotating a sequence is changing this set of <em>tags</em> by adding new tags, deleting some others or changing the value associated to a tag.</p>
|
|
<h5 id="adding-annotations">
|
|
Adding annotations
|
|
<a class="anchor" href="#adding-annotations">#</a>
|
|
</h5>
|
|
<p>To add a new <em>tag</em>/<em>value</em> pair to a sequence <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a> propose the generic option <code>--set-tag</code>
|
|
Considering the following file:</p>
|
|
|
|
<a style="padding: 10px 20px; background-color: #cacaca; border: 1px solid #8e8080; border-bottom: none; border-radius: 5px 5px 0 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1)"
|
|
href="empty.fasta" download="empty.fasta">📄 empty.fasta</a>
|
|
<DIV style="border: 2px solid #8e8080; border-radius: 0 0 5px 5px; padding: 20px; background-color: white; ">
|
|
|
|
<pre tabindex="0"><code class="language-fasta" data-lang="fasta">>seqA1
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre></td>
|
|
|
|
</DIV>
|
|
|
|
<p>To add a <code>foo</code> tag to each sequence associated to the numeric value <code>3</code> the command is:</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --set-tag foo<span style="color:#f92672">=</span><span style="color:#ae81ff">3</span> empty.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"foo":3}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"foo":3}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"foo":3}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"foo":3}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"foo":3}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>The argument of the <code>--set-tag</code> option <code>foo=3</code> can be decomposed in two parts separated by the equal sign.
|
|
The left part <code>foo</code> is the name of the target tag, the right part is the value to assign to the tag.</p>
|
|
<p>The left part must be a string when the right part is actually an
|
|
<a href="http://metabar:8888/obidoc/docs/programming/expression/"><em>OBITools4</em> expression language</a>. Here the expression is simple <code>3</code>, which is evaluated to the <em>3</em> integer value.</p>
|
|
<p>To assign as string value to a tag, the rigth part of the option argument must be a valid
|
|
<a href="http://metabar:8888/obidoc/docs/programming/expression/"><em>OBITools4</em> expression language</a> corresponding to a string: <code>"bar"</code> with double quotes flanking the text having to be assigned. But to prevent the Bash UNIX shell to interpret itself the option parameter <code>foo="bar"</code>, it has to be protected itself by single quote.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --set-tag <span style="color:#e6db74">'foo="bar"'</span> empty.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"foo":"bar"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"foo":"bar"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"foo":"bar"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"foo":"bar"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"foo":"bar"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>As the right part is an expression, it can be more complex and realize some basic computations. In the next example the <em>foo</em> tag is valuated with the sequence identifier prefixed by <code>"bar-"</code>.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --set-tag <span style="color:#e6db74">'foo="bar-" + sequence.Id()'</span> empty.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"foo":"bar-seqA1"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"foo":"bar-seqB1"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"foo":"bar-seqA2"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"foo":"bar-seqC1"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"foo":"bar-seqB2"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>The complete description of the <em>OBITools4</em> expression language is available
|
|
<a href="http://metabar:8888/obidoc/docs/programming/expression/">here</a>.</p>
|
|
<p>All the previous examples are tagging each sequence in the same way, but you can also use <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a> to modify the annotation of only a subset of the sequence. As explained in the introduction of this documentation, this is achieved by combining selection and edition options.</p>
|
|
<p>For instance, to add a <em>foo</em> tag only to the single sequence having the id <code>seqA2</code>, is achieved by combining the selection option <code>-I seqA2</code> and the edition option <code>--set-tag 'foo="bar"'</code></p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate -I seqA2 --set-tag <span style="color:#e6db74">'foo="bar"'</span> empty.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"foo":"bar"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>Used with <a href="http://metabar:8888/obidoc/obitools/obigrep/">
|
|
<abbr title="obigrep: filter a sequence file"><code>obigrep</code></abbr>
|
|
</a> the <code>-I seqA2</code> would have selected only the modified sequence.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obigrep -I seqA2 empty.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA2
|
|
gtagctagctagctagctagctagctaga
|
|
</code></pre><p>The selection options being shared between <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a> and <a href="http://metabar:8888/obidoc/obitools/obigrep/">
|
|
<abbr title="obigrep: filter a sequence file"><code>obigrep</code></abbr>
|
|
</a>, good method to check which sequences will be modified by <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a> is to check the selection options at first with <a href="http://metabar:8888/obidoc/obitools/obigrep/">
|
|
<abbr title="obigrep: filter a sequence file"><code>obigrep</code></abbr>
|
|
</a>. Only the sequences present in the <a href="http://metabar:8888/obidoc/obitools/obigrep/">
|
|
<abbr title="obigrep: filter a sequence file"><code>obigrep</code></abbr>
|
|
</a> output will be edited by <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a>.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obigrep -l <span style="color:#ae81ff">30</span> empty.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqB1
|
|
tagctagctagctagctagctagctagcta
|
|
>seqB2
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate -l <span style="color:#ae81ff">30</span> <span style="color:#ae81ff">\
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> --set-tag <span style="color:#e6db74">'foo="bar-" + sequence.Id()'</span> <span style="color:#ae81ff">\
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> empty.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"foo":"bar-seqB1"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"foo":"bar-seqB2"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><h5 id="renaming-tags">
|
|
Renaming tags
|
|
<a class="anchor" href="#renaming-tags">#</a>
|
|
</h5>
|
|
<p>Renaming tags can be useful for accounting for changes in a pipeline, adapting old datasets to new scripts or saving annotations produced by an *OBITools* command before rerunning it with different parameters. Consider the following fasta file:</p>
|
|
<p><a style="padding: 10px 20px; background-color: #cacaca; border: 1px solid #8e8080; border-bottom: none; border-radius: 5px 5px 0 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1)"
|
|
href="five_tags.fasta" download="five_tags.fasta">📄 five_tags.fasta</a></p>
|
|
<DIV style="border: 2px solid #8e8080; border-radius: 0 0 5px 5px; padding: 20px; background-color: white; ">
|
|
<pre tabindex="0"><code class="language-fasta" data-lang="fasta">>seqA1 {"count":1,"tata":"bar","taxid":"taxon:9606 [Homo sapiens]@species","toto":"titi"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"tata":"bar","taxid":"taxon:63221 [Homo sapiens neanderthalensis]@subspecies","toto":"tata"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"count":5,"tata":"foo","taxid":"taxon:9605 [Homo]@genus","toto":"tutu"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"count":15,"tata":"foo","taxid":"taxon:9604 [Hominidae]@family","toto":"foo"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"count":25,"tata":"bar"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre></td>
|
|
</DIV>
|
|
<p>If you want to keep the taxonomic annotations as a reference before running the <a href="http://metabar:8888/obidoc/obitools/obitag/">
|
|
<abbr title="obitag: annotate sequences with taxonomic information"><code>obitag</code></abbr>
|
|
</a> command to produce a new one and then be able to compare the new one to the old one later, you can rename the <code>taxid</code> tag to <code>ref_taxid</code> and then run the <a href="http://metabar:8888/obidoc/obitools/obitag/">
|
|
<abbr title="obitag: annotate sequences with taxonomic information"><code>obitag</code></abbr>
|
|
</a> command, which will set a new ’taxid’ tag.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --rename-tag ref_taxid<span style="color:#f92672">=</span>taxid five_tags.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"count":1,"ref_taxid":"taxon:9606 [Homo sapiens]@species","tata":"bar","toto":"titi"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"ref_taxid":"taxon:63221 [Homo sapiens neanderthalensis]@subspecies","tata":"bar","toto":"tata"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"count":5,"ref_taxid":"taxon:9605 [Homo]@genus","tata":"foo","toto":"tutu"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"count":15,"ref_taxid":"taxon:9604 [Hominidae]@family","tata":"foo","toto":"foo"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"count":25,"tata":"bar"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><h5 id="adding-a-serial-number-to-each-sequence">
|
|
Adding a serial number to each sequence
|
|
<a class="anchor" href="#adding-a-serial-number-to-each-sequence">#</a>
|
|
</h5>
|
|
<p>It can be useful to add a serial number to each sequence. This can be done by using the <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a> command with the <code>--number</code>. That option will add a new tag to each sequence, with the name <code>seq_number</code> valued with an integer value that is incremented for each sequence.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --number empty.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"seq_number":1}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"seq_number":2}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"seq_number":3}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"seq_number":4}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"seq_number":5}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><h6 id="adding-sequence-related-annotations">
|
|
Adding sequence related annotations
|
|
<a class="anchor" href="#adding-sequence-related-annotations">#</a>
|
|
</h6>
|
|
<p>–length<br>
|
|
–aho-corasick <string>
|
|
–pattern <PATTERN>
|
|
–pattern-name
|
|
–pattern-error
|
|
–allows-indels</p>
|
|
<h6 id="edit-taxonomy-related-annotations">
|
|
Edit taxonomy related annotations
|
|
<a class="anchor" href="#edit-taxonomy-related-annotations">#</a>
|
|
</h6>
|
|
<p>–scientific-name</p>
|
|
<p>–with-taxon-at-rank <RANK_NAME></p>
|
|
<p>–taxonomic-rank</p>
|
|
<p>–taxonomic-path</p>
|
|
<p>–raw-taxid</p>
|
|
<p>–add-lca-in <SLOT_NAME>
|
|
–lca-error <#.###></p>
|
|
<h5 id="deleting-annotations">
|
|
Deleting annotations
|
|
<a class="anchor" href="#deleting-annotations">#</a>
|
|
</h5>
|
|
<p>There are three options that allow for deleting annotations associated with a sequence.
|
|
The easiest one is <code>--clear</code>. It removes every annotation associated to a sequence.</p>
|
|
<p>Considering the fasta sequence file</p>
|
|
|
|
<a style="padding: 10px 20px; background-color: #cacaca; border: 1px solid #8e8080; border-bottom: none; border-radius: 5px 5px 0 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1)"
|
|
href="five_tags.fasta" download="five_tags.fasta">📄 five_tags.fasta</a>
|
|
<DIV style="border: 2px solid #8e8080; border-radius: 0 0 5px 5px; padding: 20px; background-color: white; ">
|
|
|
|
<pre tabindex="0"><code class="language-fasta" data-lang="fasta">>seqA1 {"count":1,"tata":"bar","taxid":"taxon:9606 [Homo sapiens]@species","toto":"titi"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"tata":"bar","taxid":"taxon:63221 [Homo sapiens neanderthalensis]@subspecies","toto":"tata"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"count":5,"tata":"foo","taxid":"taxon:9605 [Homo]@genus","toto":"tutu"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"count":15,"tata":"foo","taxid":"taxon:9604 [Hominidae]@family","toto":"foo"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"count":25,"tata":"bar"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre></td>
|
|
|
|
</DIV>
|
|
|
|
<p>The next command removes all the annotations</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --clear five_tags.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>If you combine a selection option, here <code>-C 10</code> which selects all the sequences occurring at most ten times, and the <code>--clear</code> option, you will delete annotations only on selected sequences. For other sequences the annotations are kept.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate -C <span style="color:#ae81ff">10</span> --clear five_tags.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"count":15,"tata":"foo","taxid":"taxon:9604 [Hominidae]@family","toto":"foo"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"count":25,"tata":"bar"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>It is possible to delete a given tag based on its name using the <code>--delete-tag</code> option. In the following example the <strong>taxid</strong> tag is deleted. As the <strong>seqB2</strong> sequence does not exhibe a <strong>taxid</strong> tag, it is not affected.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --delete-tag taxid five_tags.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"count":1,"tata":"bar","toto":"titi"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"tata":"bar","toto":"tata"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"count":5,"tata":"foo","toto":"tutu"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"count":15,"tata":"foo","toto":"foo"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"count":25,"tata":"bar"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>Several <code>--delete-tag</code> options can be inserted in a single <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a> command.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --delete-tag taxid <span style="color:#ae81ff">\
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> --delete-tag count <span style="color:#ae81ff">\
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> five_tags.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"tata":"bar","toto":"titi"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"tata":"bar","toto":"tata"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"tata":"foo","toto":"tutu"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"tata":"foo","toto":"foo"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"tata":"bar"}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>The last way to delete annotations is indirect. It is based on the <code>--keep</code> option, indicating the annotation to be kept. Consequently, all the other tags, the not kept, are deleted</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --keep taxid five_tags.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"taxid":"taxon:9606 [Homo sapiens]@species"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"taxid":"taxon:63221 [Homo sapiens neanderthalensis]@subspecies"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"taxid":"taxon:9605 [Homo]@genus"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"taxid":"taxon:9604 [Hominidae]@family"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>Similarly to <code>--delete-tag</code> several <code>--keep</code> options can be provided to keep several annotations.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --keep taxid <span style="color:#ae81ff">\
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> --keep count <span style="color:#ae81ff">\
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> five_tags.fasta
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>seqA1 {"count":1,"taxid":"taxon:9606 [Homo sapiens]@species"}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>seqB1 {"taxid":"taxon:63221 [Homo sapiens neanderthalensis]@subspecies"}
|
|
tagctagctagctagctagctagctagcta
|
|
>seqA2 {"count":5,"taxid":"taxon:9605 [Homo]@genus"}
|
|
gtagctagctagctagctagctagctaga
|
|
>seqC1 {"count":15,"taxid":"taxon:9604 [Hominidae]@family"}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>seqB2 {"count":25}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><h5 id="changing-annotation-values">
|
|
Changing annotation values
|
|
<a class="anchor" href="#changing-annotation-values">#</a>
|
|
</h5>
|
|
<h4 id="edition-of-the-identifier">
|
|
Edition of the identifier
|
|
<a class="anchor" href="#edition-of-the-identifier">#</a>
|
|
</h4>
|
|
<p>The identifier of a sequence can be updated by using the <code>--set-id</code> option. One of the most useful use cases of this option is to substitute the long id generated by the sequencer, by a new short one based on a number incremented from sequence to sequence, as the one generated by the <code>--number</code> option. To achieve this, one can use two piped <a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a> commands. The first adds the <code>seq_number</code> annotation to the sequences, and then the second updates the sequence id from this newly added <code>seq_number</code> tag.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --number empty.fasta <span style="color:#ae81ff">\
|
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> | obiannotate --set-id <span style="color:#e6db74">'sprintf("motus_%04d", annotations.seq_number)'</span>
|
|
</span></span></code></pre></div><pre tabindex="0"><code>>motus_0001 {"seq_number":1}
|
|
cgatgctgcatgctagtgctagtcgat
|
|
>motus_0002 {"seq_number":2}
|
|
tagctagctagctagctagctagctagcta
|
|
>motus_0003 {"seq_number":3}
|
|
gtagctagctagctagctagctagctaga
|
|
>motus_0004 {"seq_number":4}
|
|
cgatgctccatgctagtgctagtcgatga
|
|
>motus_0005 {"seq_number":5}
|
|
cgatggctccatgctagtgctagtcgatga
|
|
</code></pre><p>The <code>sprintf</code> function of the
|
|
<a href="http://metabar:8888/obidoc/docs/programming/expression/"><em>OBITools4</em> expression language</a> is used to format sequence identifiers. It requires a format string, in this case <code>"motus_%04d"</code>, which describes how the new identifier will be generated. In this case, <code>%04d</code> will be replaced by the second argument of the <code>sprintf()</code> function, <code>annotations.seq_number</code>, which is the number associated with the sequence in the file. <code>d</code> indicates a decimal integer value, and the <code>4</code> in front specifies that this number will be padded to 4 digits. The <code>0</code> before the <code>4</code> indicates that the number will be padded with zeros.</p>
|
|
<p>The result of the <code>printf</code> function can be seen in the results presented. The first sequence is given the identifier <code>motus_0001</code>, the second is given the identifier <code>motus_0002</code>, and so on.</p>
|
|
<h4 id="edition-of-the-definition">
|
|
Edition of the definition
|
|
<a class="anchor" href="#edition-of-the-definition">#</a>
|
|
</h4>
|
|
<h4 id="edition-of-the-sequence">
|
|
Edition of the sequence
|
|
<a class="anchor" href="#edition-of-the-sequence">#</a>
|
|
</h4>
|
|
<p>–cut <###:###> <br>
|
|
–sequence</p>
|
|
<h2 id="synopsis">
|
|
Synopsis
|
|
<a class="anchor" href="#synopsis">#</a>
|
|
</h2>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate <span style="color:#f92672">[</span>--add-lca-in <SLOT_NAME><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--aho-corasick <string><span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--allows-indels<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--approx-pattern <PATTERN><span style="color:#f92672">]</span>...
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--attribute|-a <KEY<span style="color:#f92672">=</span>VALUE><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--batch-size <int><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--clear<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--compress|-Z<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--csv<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--cut <<span style="color:#75715e">###:###>] [--debug]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--definition|-D <PATTERN><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--delete-tag <KEY><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--ecopcr<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--embl<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--fail-on-taxonomy<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--fasta<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--fasta-output<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--fastq<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--fastq-output<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--force-one-cpu<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--genbank<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--has-attribute|-A <KEY><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--help|-h|-?<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--id-list <FILENAME><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--identifier|-I <PATTERN><span style="color:#f92672">]</span>...
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--ignore-taxon|-i <TAXID><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--input-OBI-header<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--input-json-header<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--inverse-match|-v<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--json-output<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--keep|-k <KEY><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--lca-error <<span style="color:#75715e">#.###>] [--length]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--max-count|-C <COUNT><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--max-cpu <int><span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--max-length|-L <LENGTH><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--min-count|-c <COUNT><span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--min-length|-l <LENGTH><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--no-order<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--no-progressbar<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--number<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--only-forward<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--out|-o <FILENAME><span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--output-OBI-header|-O<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--output-json-header<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--paired-mode <forward|reverse|and|or|andnot|xor><span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--pattern <string><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--pattern-error <int><span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--pattern-name <string><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--pprof<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--pprof-goroutine <int><span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--pprof-mutex <int><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--predicate|-p <EXPRESSION><span style="color:#f92672">]</span>...
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--raw-taxid<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--rename-tag|-R <NEW_NAME<span style="color:#f92672">=</span>OLD_NAME><span style="color:#f92672">]</span>...
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--require-rank <RANK_NAME><span style="color:#f92672">]</span>...
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--restrict-to-taxon|-r <TAXID><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--scientific-name<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--sequence|-s <PATTERN><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--set-identifier <EXPRESSION><span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--set-tag|-S <KEY<span style="color:#f92672">=</span>EXPRESSION><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span>--silent-warning<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--skip-empty<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--solexa<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--taxonomic-path<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--taxonomic-rank<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--taxonomy|-t <string><span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--u-to-t<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--update-taxid<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--valid-taxid<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--version<span style="color:#f92672">]</span> <span style="color:#f92672">[</span>--with-leaves<span style="color:#f92672">]</span>
|
|
</span></span><span style="display:flex;"><span> <span style="color:#f92672">[</span>--with-taxon-at-rank <RANK_NAME><span style="color:#f92672">]</span>... <span style="color:#f92672">[</span><args><span style="color:#f92672">]</span>
|
|
</span></span></code></pre></div><h2 id="options">
|
|
Options
|
|
<a class="anchor" href="#options">#</a>
|
|
</h2>
|
|
<h4 id="hahahugoshortcode17s31hbhb-specific-options">
|
|
<a href="http://metabar:8888/obidoc/obitools/obiannotate/">
|
|
<abbr title="obiannotate: edit sequence annotations"><code>obiannotate</code></abbr>
|
|
</a> specific options
|
|
<a class="anchor" href="#hahahugoshortcode17s31hbhb-specific-options">#</a>
|
|
</h4>
|
|
<h5 id="identifier-modification">
|
|
Identifier modification
|
|
<a class="anchor" href="#identifier-modification">#</a>
|
|
</h5>
|
|
<ul>
|
|
<li><b><code class="language-bash">--set-identifier</code></b> <EXPRESSION>: An expression used to assigned the new id of the sequence.
|
|
</li>
|
|
</ul>
|
|
<h5 id="attribute-modification">
|
|
Attribute modification
|
|
<a class="anchor" href="#attribute-modification">#</a>
|
|
</h5>
|
|
<ul>
|
|
<li><b><code class="language-bash">--clear</code></b>: Clears all attributes associated to the sequence records.
|
|
</li>
|
|
<li><b><code class="language-bash">--delete-tag</code></b> <KEY>: Deletes attribute named <code>KEY</code>. When this attribute is missing, the sequence record is skipped and the next one is examined.
|
|
</li>
|
|
<li><b><code class="language-bash">--keep</code></b>
|
|
| <b><code class="language-bash">-k</code></b>
|
|
<KEY>: Keeps only attribute named <code>KEY</code>. Several -k options can be combined.
|
|
</li>
|
|
<li><b><code class="language-bash">--rename-tag</code></b>
|
|
| <b><code class="language-bash">-R</code></b>
|
|
<NEW_NAME=OLD_NAME>: Changes attribute name <code>OLD_NAME</code> to <code>NEW_NAME</code>. When attribute named <code>OLD_NAME</code> is missing, the sequence record is skipped and the next one is examined.
|
|
</li>
|
|
<li><b><code class="language-bash">--set-tag</code></b>
|
|
| <b><code class="language-bash">-S</code></b>
|
|
<KEY=EXPRESSION>: Creates a new attribute named with a key <code>KEY</code> set with a value computed from <code>EXPRESSION</code>.
|
|
</li>
|
|
</ul>
|
|
<h5 id="sequence-related-annotation">
|
|
Sequence-related annotation
|
|
<a class="anchor" href="#sequence-related-annotation">#</a>
|
|
</h5>
|
|
<ul>
|
|
<li><b><code class="language-bash">--aho-corasick</code></b> <string>: Adds an aho-corasick attribute with the count of matches of the provided patterns.
|
|
</li>
|
|
<li><b><code class="language-bash">--length</code></b>: Adds attribute with seq_length as a key and sequence length as a value.
|
|
</li>
|
|
<li><b><code class="language-bash">--pattern</code></b> <string>: Adds a pattern attribute containing the pattern, a pattern_match attribute indicating the matched sequence, and a pattern_error slot indicating the number difference between the pattern and the match to the sequence.
|
|
</li>
|
|
<li><b><code class="language-bash">--pattern-name</code></b> <string>: specifies the name to use as prefix for the attributes reporting the match. (default: “pattern”)</li>
|
|
</ul>
|
|
<h5 id="sequence-modification">
|
|
Sequence modification
|
|
<a class="anchor" href="#sequence-modification">#</a>
|
|
</h5>
|
|
<ul>
|
|
<li><b><code class="language-bash">--cut</code></b> <###:###>: A pattern describing how to cut the sequence.
|
|
</li>
|
|
</ul>
|
|
<h5 id="taxonomy-annotation">
|
|
Taxonomy annotation
|
|
<a class="anchor" href="#taxonomy-annotation">#</a>
|
|
</h5>
|
|
<ul>
|
|
<li><b><code class="language-bash">--add-lca-in</code></b> <KEY>: From the taxonomic annotation of the sequence (taxid attribute or merged_taxid attribute), a new attribute named <code>KEY</code> is added with the taxid of the lowest common ancestor corresponding to the current annotation.
|
|
</li>
|
|
<li><b><code class="language-bash">--lca-error</code></b> <#.###>: Error rate tolerated on the taxonomical description during the lowest common ancestor. At most a fraction of lca-error of the taxonomic information can disagree with the estimated LCA. (default: 0.000000)
|
|
</li>
|
|
<li><b><code class="language-bash">--scientific-name</code></b>: Annotates the sequence with its scientific name.
|
|
</li>
|
|
</ul>
|
|
<h4 id="taxonomy-options">
|
|
Taxonomy options
|
|
<a class="anchor" href="#taxonomy-options">#</a>
|
|
</h4>
|
|
<h4 id="check-taxids-against-a-taxonomy">
|
|
Check <em>taxids</em> against a taxonomy
|
|
<a class="anchor" href="#check-taxids-against-a-taxonomy">#</a>
|
|
</h4>
|
|
|
|
|
|
<i>OBITools4</i> allow loading a taxonomy database when they are processing
|
|
sequence data. If done, the command checks the validity of <i>taxids</i> during
|
|
the processing of the command. Three cases can occur:
|
|
|
|
<ul>
|
|
<li>The taxon is valid</li>
|
|
<li>The taxon is no more valid, but a new one replaces it</li>
|
|
<li>The taxon is no more valid, and no new taxid exists to replace it.</li>
|
|
</ul>
|
|
|
|
In the first case, the obitools normalize the writing of the taxid in the form:
|
|
|
|
<pre>
|
|
TAXCOD:TAXID [SCIENTIFIC NAME]@RANK
|
|
</pre>
|
|
|
|
As example with the NCBI taxonomy the human taxid looks like :
|
|
|
|
<pre>
|
|
taxon:9606 [Homo sapiens]@species
|
|
</pre>
|
|
|
|
That rewriting doesn't happen if the <b>--raw-taxid</b> option is set.
|
|
In that case only the raw <i>taxid</i> is conserved.
|
|
|
|
<pre>
|
|
9606
|
|
</pre>
|
|
|
|
In the second case, a warning message is logged on the standard error. If the
|
|
<b>--update-taxid</b> is set, the command will update the expired <i>taxid</i>
|
|
to the new equivalent one, and the valid taxon rules apply. Otherwise, the old
|
|
<i>taxid</i> is maintained in the result.
|
|
|
|
In the last case, a warning message is also issued to the standard error, and
|
|
non-valid taxid is conserved as is. If the <b>--fail-on-taxonomy</b> option is
|
|
set, the command stop and exit with an error at the first non-valid <i>taxid</i>
|
|
encountred in input data.
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--taxonomy</code></b>
|
|
| <b><code class="language-bash">-t</code></b>
|
|
<string>: Path to the taxonomic database.
|
|
</li>
|
|
<li><b><code class="language-bash">--raw-taxid</code></b>: Displays the raw taxid for each displayed taxon. (default: false)</li>
|
|
<li><b><code class="language-bash">--update-taxid</code></b>: Make obitools automatically updating the taxids that are declared merged to a newest one (default: false).</li>
|
|
<li><b><code class="language-bash">--fail-on-taxonomy</code></b>: Make obitools failing on error if a used taxid is not a currently valid one (default: false).</li>
|
|
</ul>
|
|
<ul>
|
|
<li><b><code class="language-bash">--taxonomic-rank</code></b>: Annotates the sequence with its taxonomic rank.
|
|
</li>
|
|
<li><b><code class="language-bash">--taxonomic-path</code></b>: Annotates the sequence with its taxonomic path.
|
|
</li>
|
|
<li><b><code class="language-bash">--with-taxon-at-rank</code></b>: Adds taxonomic annotation at taxonomic rank <code>RANK_NAME</code>.
|
|
</li>
|
|
</ul>
|
|
<h4 id="selecting-sequence-records">
|
|
Selecting sequence records
|
|
<a class="anchor" href="#selecting-sequence-records">#</a>
|
|
</h4>
|
|
|
|
|
|
<h5 id="selection-based-on-the-sequence">
|
|
Selection based on the sequence
|
|
<a class="anchor" href="#selection-based-on-the-sequence">#</a>
|
|
</h5>
|
|
|
|
|
|
<h6 id="strict-matching">
|
|
Strict matching
|
|
<a class="anchor" href="#strict-matching">#</a>
|
|
</h6>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--sequence</code></b>
|
|
| <b><code class="language-bash">-s</code></b>
|
|
<PATTERN>: A <a href="/obidoc/docs/patterns/regular">Regular expression pattern</a> used to match the sequence.
|
|
Only the entries whose sequence matches the pattern are kept.
|
|
Regular expression patterns are case-insensitive.</li>
|
|
</ul>
|
|
|
|
<h6 id="approximate-matching">
|
|
Approximate matching
|
|
<a class="anchor" href="#approximate-matching">#</a>
|
|
</h6>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--approx-pattern</code></b> <PATTERN>: A <a href="/obidoc/docs/patterns/dnagrep">DNA pattern</a> used to match the sequence.
|
|
Only the entries whose sequence matches the pattern are kept.
|
|
DNA patterns are case-insensitive. They can be matched allowing
|
|
for errors: mismatches or insertions or deletions.</li>
|
|
<li><b><code class="language-bash">--allows-indels</code></b>: allows for indels during pattern DNA pattern matching (see <code>--approx-pattern</code> option).
|
|
</li>
|
|
<li><b><code class="language-bash">--pattern-error</code></b> <INTEGER>: maximum number of errors allowed when searching for patterns in DNA (default 0, see <code>--approx-pattern</code> option).
|
|
</ul>
|
|
|
|
<h5 id="selection-based-on-the-sequence-identifier">
|
|
Selection based on the sequence identifier
|
|
<a class="anchor" href="#selection-based-on-the-sequence-identifier">#</a>
|
|
</h5>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--identifier</code></b>
|
|
| <b><code class="language-bash">-I</code></b>
|
|
<REGEX>: <a href="/obidoc/docs/patterns/regular">Regular expression pattern</a> to be
|
|
tested against the sequence identifier.
|
|
The pattern is case-insensitive.</li>
|
|
<li><b><code class="language-bash">--id-list</code></b> <FILENAME>: <FILENAME> points to a text file containing the list of sequence record identifiers to be selected.
|
|
The file format consists in a single identifier per line.</li>
|
|
</ul>
|
|
|
|
<h5 id="selection-based-on-the-sequence-definition">
|
|
Selection based on the sequence definition
|
|
<a class="anchor" href="#selection-based-on-the-sequence-definition">#</a>
|
|
</h5>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--definition</code></b>
|
|
| <b><code class="language-bash">-D</code></b>
|
|
<REGEX>: <a href="/obidoc/docs/patterns/regular">Regular expression pattern</a> to be tested against the sequence definition.
|
|
The pattern is case-insensitive.</li>
|
|
</ul>
|
|
|
|
<h5 id="selection-based-on-the-sequence-properties">
|
|
Selection based on the sequence properties
|
|
<a class="anchor" href="#selection-based-on-the-sequence-properties">#</a>
|
|
</h5>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--min-count</code></b>
|
|
| <b><code class="language-bash">-c</code></b>
|
|
<COUNT>: selects the sequence records for which the number of occurrences (<em>i.e</em> the <em>count</em> attribute) is equal to or greater than the defined minimum count.</li>
|
|
<li><b><code class="language-bash">--max-count</code></b>
|
|
| <b><code class="language-bash">-C</code></b>
|
|
<COUNT>: Select the sequence records for which the occurrence count (<em>i.e</em> the <em>count</em> attribute) is equal to or smaller than the defined maximum count.</li>
|
|
<li><b><code class="language-bash">--min-length</code></b>
|
|
| <b><code class="language-bash">-l</code></b>
|
|
<LENGTH>: selects the sequence records for which the sequence length is equal to or
|
|
greater than the defined minimum sequence length.</li>
|
|
<li><b><code class="language-bash">--max-length</code></b>
|
|
| <b><code class="language-bash">-L</code></b>
|
|
<LENGTH>: selects sequence records for which the sequence length is equal to or less than the defined maximum sequence length.</li>
|
|
</ul>
|
|
|
|
<h4 id="controlling-the-input-data">
|
|
Controlling the input data
|
|
<a class="anchor" href="#controlling-the-input-data">#</a>
|
|
</h4>
|
|
|
|
|
|
<I>OBITools4</I> generally recognizes the input file format. It also recognizes
|
|
whether the input file is compressed using GZIP. But some rare files can be
|
|
misidentified, so the following options allow the user to force the format, thus
|
|
bypassing the format identification step.
|
|
|
|
<h5 id="the-file-format-options">
|
|
The file format options
|
|
<a class="anchor" href="#the-file-format-options">#</a>
|
|
</h5>
|
|
|
|
|
|
<ul>
|
|
<li>
|
|
<b><code class="language-bash">--fasta</code></b>: indicates that sequence data is in <a href="http://metabar:8888/obidoc/formats/fasta/">fasta</a> format.</li>
|
|
<li>
|
|
<b><code class="language-bash">--fastq</code></b>: indicates that sequence data is in <a href="http://metabar:8888/obidoc/formats/fastq/">fastq</a> format.</li>
|
|
<li>
|
|
<b><code class="language-bash">--embl</code></b>: indicates that sequence data is in <a href="http://metabar:8888/obidoc/formats/embl/">EMBL-ENA flatfile</a> format.</li>
|
|
<li>
|
|
<b><code class="language-bash">--csv</code></b>: indicates that sequence data is in <a href="http://metabar:8888/obidoc/docs/file_format/sequence_files/csv/">CSV</a> format.</li>
|
|
<li>
|
|
<b><code class="language-bash">--genbank</code></b>: indicates that sequence data is in <a href="http://metabar:8888/obidoc/formats/genbank/">GenBank flatfile</a> format.</li>
|
|
<li><b><code class="language-bash">--ecopcr</code></b>: indicates that sequence data is in the old ecoPCR tabulated format.</li>
|
|
</ul>
|
|
|
|
<h5 id="controlling-the-way-obitools4-are-formatting-annotations">
|
|
Controlling the way <em>OBITools4</em> are formatting annotations
|
|
<a class="anchor" href="#controlling-the-way-obitools4-are-formatting-annotations">#</a>
|
|
</h5>
|
|
|
|
|
|
These options only apply to the <a href="http://metabar:8888/obidoc/formats/fasta/">FASTA</a> and <a href="http://metabar:8888/obidoc/formats/fastq/">FASTQ</a> formats
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--input-OBI-header</code></b>: FASTA/FASTQ title line annotations follow the old OBI format.</li>
|
|
<li><b><code class="language-bash">--input-json-header</code></b>: FASTA/FASTQ title line annotations follow the JSON format.</li>
|
|
</ul>
|
|
|
|
<h5 id="controlling-quality-score-decoding">
|
|
Controlling quality score decoding
|
|
<a class="anchor" href="#controlling-quality-score-decoding">#</a>
|
|
</h5>
|
|
|
|
|
|
This option only applies to the <a href="http://metabar:8888/obidoc/formats/fastq/">FASTQ</a> formats
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--solexa</code></b>: decodes quality string according to the old Solexa specification. (default: the standard Sanger encoding is used, env: <strong>OBISSOLEXA</strong>)</li>
|
|
</ul>
|
|
|
|
<h4 id="controlling-the-output-data">
|
|
Controlling the output data
|
|
<a class="anchor" href="#controlling-the-output-data">#</a>
|
|
</h4>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--compress</code></b>
|
|
| <b><code class="language-bash">-Z</code></b>
|
|
: output is compressed using gzip. (default: false)</li>
|
|
<li><b><code class="language-bash">--no-order</code></b>: the <em>OBITools</em> ensure that the order between the input file and
|
|
the output file does not change. When multiple files are processed,
|
|
they are processed one at a time.
|
|
If the <strong>–no-order</strong> option is added to a command, multiple input
|
|
files can be opened at the same time and their contents processed
|
|
in parallel. This usually increases processing speed, but does not
|
|
guarantee the order of the sequences in the output file.
|
|
Also, processing multiple files in parallel may require more memory
|
|
to perform the computation.</li>
|
|
<li>
|
|
<b><code class="language-bash">--fasta-output</code></b>: writes sequence data in <a href="http://metabar:8888/obidoc/formats/fasta/">fasta</a> format (default if quality data is not available).</li>
|
|
<li>
|
|
<b><code class="language-bash">--fastq-output</code></b>: writes sequence data in <a href="http://metabar:8888/obidoc/formats/fastq/">fastq</a> format (default if quality data is available).</li>
|
|
<li><b><code class="language-bash">--json-output</code></b>: writes sequence data in JSON format.</li>
|
|
<li><b><code class="language-bash">--out</code></b>
|
|
| <b><code class="language-bash">-o</code></b>
|
|
<FILENAME>: filename used for saving the output (default: “-”, the standard output)</li>
|
|
<li><b><code class="language-bash">--output-OBI-header</code></b>
|
|
| <b><code class="language-bash">-O</code></b>
|
|
: writes output FASTA/FASTQ title line annotations in OBI format (default: JSON).</li>
|
|
<li><b><code class="language-bash">--output-json-header</code></b>: writew output FASTA/FASTQ title line annotations in JSON format (the default format).</li>
|
|
<li><b><code class="language-bash">--skip-empty</code></b>: sequences of length equal to zero are removed from the output (default: false).</li>
|
|
<li><b><code class="language-bash">--no-progressbar</code></b>: deactivates progress bar display (default: false).</li>
|
|
</ul>
|
|
<h4 id="general-options">
|
|
General options
|
|
<a class="anchor" href="#general-options">#</a>
|
|
</h4>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--help</code></b>
|
|
| <b><code class="language-bash">-h|-?</code></b>
|
|
: shows this help.</li>
|
|
<li><b><code class="language-bash">--version</code></b>: prints the version and exits.</li>
|
|
<li><b><code class="language-bash">--silent-warning</code></b>: This option tells obitools to stop displaying warnings.
|
|
This behaviour can be controlled by setting the <strong>OBIWARNINGS</strong> environment variable.</li>
|
|
</ul>
|
|
|
|
|
|
|
|
<h4 id="computation-related-options">
|
|
Computation related options
|
|
<a class="anchor" href="#computation-related-options">#</a>
|
|
</h4>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--max-cpu</code></b> <INTEGER>: <em>OBITools</em> can take advantage of your computer’s multi-core
|
|
architecture by parallelizing the computation across all available CPUs.
|
|
Computing on more CPUs usually requires more memory to perform the
|
|
computation. Reducing the number of CPUs used to perform a calculation
|
|
is also a way to indirectly control the amount of memory used by the
|
|
process. The number of CPUs used by <em>OBITools</em> can also be controlled
|
|
by setting the <strong>OBIMAXCPU</strong> environment variable.</li>
|
|
<li><b><code class="language-bash">--force-one-cpu</code></b>: forces the use of a single CPU core for parallel processing (default: false).</li>
|
|
<li><b><code class="language-bash">--batch-size</code></b> <INTEGER>: number of sequence per batch for parallel processing (default: 1000, env: <strong>OBIBATCHSIZE</strong>)</li>
|
|
</ul>
|
|
|
|
<h4 id="debug-related-options">
|
|
Debug related options
|
|
<a class="anchor" href="#debug-related-options">#</a>
|
|
</h4>
|
|
|
|
|
|
<ul>
|
|
<li><b><code class="language-bash">--debug</code></b>: enables debug mode, by setting log level to debug (default: false, env: <strong>OBIDEBUG</strong>)</li>
|
|
<li><b><code class="language-bash">--pprof</code></b>: enables pprof server. Look at the log for details. (default: false).</li>
|
|
<li><b><code class="language-bash">--pprof-mutex</code></b> <INTEGER>: enables profiling of mutex lock. (default: 10, env: <strong>OBIPPROFMUTEX</strong>)</li>
|
|
<li><b><code class="language-bash">--pprof-goroutine</code></b> <INTEGER>: enables profiling of goroutine blocking profile. (default: 6060, env: <strong>OBIPPROFGOROUTINE</strong>)</li>
|
|
</ul>
|
|
<h2 id="examples">
|
|
Examples
|
|
<a class="anchor" href="#examples">#</a>
|
|
</h2>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>obiannotate --help
|
|
</span></span></code></pre></div></article>
|
|
|
|
|
|
|
|
<footer class="book-footer">
|
|
|
|
<div class="flex flex-wrap justify-between">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script>
|
|
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
<div class="book-comments">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
|
</div>
|
|
|
|
|
|
<aside class="book-toc">
|
|
<div class="book-toc-content">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#obiannotate-edit-sequence-annotations"><code>obiannotate</code>: edit sequence annotations</a>
|
|
<ul>
|
|
<li><a href="#description">Description</a>
|
|
<ul>
|
|
<li><a href="#the-selection-options">The selection options</a></li>
|
|
<li><a href="#the-edition-options">The edition options</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#synopsis">Synopsis</a></li>
|
|
<li><a href="#options">Options</a>
|
|
<ul>
|
|
<li></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#examples">Examples</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|