/usr/share/doc/pbalign/html/howto.html is in pbalign-doc 0.2.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to install and run pbalign — pbalign 0.5 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.5',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="pbalign 0.5 documentation" href="index.html" />
<link rel="prev" title="pbalign" href="index.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="index.html" title="pbalign"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pbalign 0.5 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="how-to-install-and-run-pbalign">
<h1>How to install and run pbalign<a class="headerlink" href="#how-to-install-and-run-pbalign" title="Permalink to this headline">¶</a></h1>
<p>pbalign is a tool for aligning PacBio reads to reference sequences.
It is part of the PacBio Bioinformatics tools, and will
be bundled in the 2.1 release of SMRTanalysis. You may also follow the
instructions below to install pbalign.</p>
<p><em>Note: the pseudo namespace pbtools has been removed in version 0.2.0.</em></p>
<p><em>Note: program name has been changed from `pbalign.py` in version 0.1.0
to `pbalign` in version 0.2.0.</em></p>
<p><em>Note: please install this software on an isolated machine that does
not have SMRTanalysis installed.</em></p>
<div class="section" id="background">
<h2>Background<a class="headerlink" href="#background" title="Permalink to this headline">¶</a></h2>
<p><strong>pbalign</strong> aligns PacBio reads to reference sequences, filters aligned
reads according to user-specific filtering criteria, and converts the
output to either the SAM format or PacBio Compare HDF5 (e.g., .cmp.h5)
format. The output Compare HDF5 file will be compatible with Quiver if
<code class="docutils literal"><span class="pre">--forQuiver</span></code> option is specified.</p>
</div>
<div class="section" id="required-software">
<h2>Required software<a class="headerlink" href="#required-software" title="Permalink to this headline">¶</a></h2>
<p>pbalign is available through the <code class="docutils literal"><span class="pre">pbalign</span></code> script from the
<code class="docutils literal"><span class="pre">pbalign</span></code> package. To use pbalign, the following PacBio software is
required,</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">pbalign</span></code>, containing <code class="docutils literal"><span class="pre">pbalign</span></code></li>
<li><code class="docutils literal"><span class="pre">pbcore</span></code>, a package providing access to PacBio data files</li>
<li><code class="docutils literal"><span class="pre">blasr</span></code>, a package of PacBio aligner blasr, containing c++ executables
for processing PacBio data, such as <code class="docutils literal"><span class="pre">blasr</span></code>, <code class="docutils literal"><span class="pre">pls2fasta</span></code>,
<code class="docutils literal"><span class="pre">samFilter</span></code>, <code class="docutils literal"><span class="pre">samtoh5</span></code> and <code class="docutils literal"><span class="pre">loadPulses</span></code></li>
</ul>
<p>The following software is optionally required if <code class="docutils literal"><span class="pre">--forQuiver</span></code> option
will be used to convert the output Compare HDF5 file to be compatible
with Quiver.
- <code class="docutils literal"><span class="pre">pbh5tools.cmph5tools</span></code>, a PacBio Bioinformatics tools that manipulates
Compare HDF5 files.
- <code class="docutils literal"><span class="pre">h5repack</span></code>, a HDF5 tool to compress and repack HDF5 files.</p>
<p>The default aligner that pbalign uses is <code class="docutils literal"><span class="pre">blasr</span></code>. If you want to use
bowtie2 as aligner, then the bowtie2 package also needs to be installed.</p>
</div>
<div class="section" id="required-libraries-and-tools">
<h2>Required libraries and tools<a class="headerlink" href="#required-libraries-and-tools" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Python 2.7.3</li>
<li>virtualenv (builds isolated Python environments)</li>
<li>numpy 1.6.1 (required by pbcore)</li>
<li>h5py 2.0.1 (required by pbcore)</li>
</ul>
<p>If you are within PacBio, these requirements are already installed
within the cluster environment.</p>
<p>Otherwise, you will need to install them yourself.</p>
</div>
<div class="section" id="data-file-requirements">
<h2>Data file requirements<a class="headerlink" href="#data-file-requirements" title="Permalink to this headline">¶</a></h2>
<p>pbalign distinguishes input and output file formats by file extensions.</p>
<p>The input PacBio reads can be in FASTA, Base HDF5, Pulse HDF5, Circular
Consensus Sequence (CCS) HDF5 or file or file names (FOFN). The supported
input file extensions are as follows.</p>
<ul class="simple">
<li>FASTA : .fa or .fasta</li>
<li>PacBio BASE HDF5 : .bas.h5 or .bax.h5</li>
<li>PacBio PULSE HDF5 : .pls.h5 or .plx.h5</li>
<li>PacBio CCS HDF5 : .ccs.h5</li>
<li>File of file names : .fofn</li>
</ul>
<p>The input reference sequences can be in a FASTA file or a reference deposit
directory created by referenceUploader (a PacBio tool for uploading
references to the server and data preprocessing).</p>
<p>The output file can either be a SAM file or a Compare HDF5 file. The output
Compare HDF5 file cannot be consumed by Quiver directly unleis <code class="docutils literal"><span class="pre">--forQuiver</span></code>
option is specified. The supported output file extensions are as follows.</p>
<ul class="simple">
<li>SAM : .sam</li>
<li>PacBio Compare HDF5: .cmp.h5</li>
</ul>
</div>
<div class="section" id="manual-installation-instructions">
<h2>Manual installation instructions<a class="headerlink" href="#manual-installation-instructions" title="Permalink to this headline">¶</a></h2>
<div class="section" id="step-1-set-up-your-python-virtual-environment">
<h3>Step 1: Set up your Python virtual environment<a class="headerlink" href="#step-1-set-up-your-python-virtual-environment" title="Permalink to this headline">¶</a></h3>
<p>To install <code class="docutils literal"><span class="pre">Python</span> <span class="pre">2.7</span></code>, please visit</p>
<div class="highlight-python"><div class="highlight"><pre>http://www.python.org/
</pre></div>
</div>
<p>, or if you have root permission on Ubuntu, execute</p>
<div class="highlight-python"><div class="highlight"><pre>sudo apt-get install python
</pre></div>
</div>
<p>To install <code class="docutils literal"><span class="pre">pip</span></code>, please visit</p>
<div class="highlight-python"><div class="highlight"><pre>https://pypi.python.org/pypi/pip
</pre></div>
</div>
<p>, or if you have root permission using Ubuntu, execute</p>
<div class="highlight-python"><div class="highlight"><pre>sudo apt-get install python-pip
</pre></div>
</div>
<p>To install <code class="docutils literal"><span class="pre">virtualenv</span></code>, please visit</p>
<div class="highlight-python"><div class="highlight"><pre>https://pypi.python.org/pypi/virtualenv
</pre></div>
</div>
<p>, or execute</p>
<div class="highlight-python"><div class="highlight"><pre>pip install virtualenv
</pre></div>
</div>
<p>To set up a new virtualenv, do</p>
<div class="highlight-python"><div class="highlight"><pre>$ cd; virtualenv -p python2.7 --no-site-packages my_env
</pre></div>
</div>
<p>, and activate the virtualenv using</p>
<div class="highlight-python"><div class="highlight"><pre>$ source ~/my_env/bin/activate
</pre></div>
</div>
<p>To install <code class="docutils literal"><span class="pre">git</span></code>, please visit</p>
<div class="highlight-python"><div class="highlight"><pre>http://git-scm.com/.
</pre></div>
</div>
</div>
<div class="section" id="step-2-install-required-software-and-library">
<h3>Step 2: Install required software and library<a class="headerlink" href="#step-2-install-required-software-and-library" title="Permalink to this headline">¶</a></h3>
<p>To install blasr, please execute</p>
<div class="highlight-python"><div class="highlight"><pre>$ git clone https://github.com/PacificBiosciences/blasr
</pre></div>
</div>
<p>, and follow instructions at</p>
<div class="highlight-python"><div class="highlight"><pre>https://github.com/PacificBiosciences/blasr/blob/master/README.md
</pre></div>
</div>
<p>Before installing pbcore, you may need to install numpy and h5py from</p>
<div class="highlight-python"><div class="highlight"><pre>http://www.numpy.org/
https://code.google.com/p/h5py/
</pre></div>
</div>
<p>, or if you have root permission on Ubuntu, do</p>
<div class="highlight-python"><div class="highlight"><pre>$ git install numpy
$ sudo apt-get install libhdf5-serial-dev
$ git install h5py
</pre></div>
</div>
<p>To install pbcore, execute</p>
<div class="highlight-python"><div class="highlight"><pre>$ pip install git+https://github.com/PacificBiosciences/pbcore
</pre></div>
</div>
</div>
<div class="section" id="step-3-install-optionally-required-software-and-library">
<h3>Step 3: Install optionally required software and library<a class="headerlink" href="#step-3-install-optionally-required-software-and-library" title="Permalink to this headline">¶</a></h3>
<p>To install pbh5tools, execute</p>
<div class="highlight-python"><div class="highlight"><pre>$ pip install git+https://github.com/PacificBiosciences/pbh5tools
</pre></div>
</div>
<p>To install <code class="docutils literal"><span class="pre">HDF5</span> <span class="pre">tools</span></code>, visit</p>
<div class="highlight-python"><div class="highlight"><pre>http://www.hdfgroup.org/products/hdf5_tools/
</pre></div>
</div>
<p>, or if you have root permission on Ubuntu, do</p>
<div class="highlight-python"><div class="highlight"><pre>$ sudo apt-get install hdf5-tools
</pre></div>
</div>
</div>
<div class="section" id="step-4-install-pbalign">
<h3>Step 4: Install pbalign<a class="headerlink" href="#step-4-install-pbalign" title="Permalink to this headline">¶</a></h3>
<p>To <em>uninstall</em> pbalign, execute</p>
<div class="highlight-python"><div class="highlight"><pre>$ pip uninstall pbalign
</pre></div>
</div>
<p>To install pbalign, execute</p>
<div class="highlight-python"><div class="highlight"><pre>$ pip install git+https://github.com/PacificBiosciences/pbalign
</pre></div>
</div>
<p>, or to download the whole pbalign package with examples</p>
<div class="highlight-python"><div class="highlight"><pre>$ git clone https://github.com/PacificBiosciences/pbalign.git
$ cd pbalign
$ pip install .
</pre></div>
</div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<ol class="arabic simple">
<li>Basic usage of pbalign.</li>
</ol>
<ul>
<li><p class="first">Example (1.1)</p>
<div class="highlight-python"><div class="highlight"><pre>$ pbalign tests/data/example_read.fasta \
tests/data/example_ref.fasta \
example.sam
</pre></div>
</div>
</li>
<li><p class="first">Example (1.2)</p>
<div class="highlight-python"><div class="highlight"><pre>$ pbalign tests/data/example_read.fasta \
tests/data/example_ref.fasta \
example.cmp.h5
</pre></div>
</div>
</li>
<li><p class="first">Example (1.3) - with optional arguments</p>
<div class="highlight-python"><div class="highlight"><pre>$ pbalign --maxHits 10 --hitPolicy all \
tests/data/example_read.fasta \
tests/data/example_ref.fasta \
example.sam
</pre></div>
</div>
</li>
</ul>
<ol class="arabic simple" start="2">
<li>Advanced usage of pbalign.</li>
</ol>
<ul>
<li><p class="first">Example (2.1) - Import pre-defined options from a config File</p>
<div class="highlight-python"><div class="highlight"><pre>$ pbalign --configFile=tests/data/1.config \
tests/data/example_read.fasta \
tests/data/example_ref.fasta \
example.sam
</pre></div>
</div>
</li>
<li><p class="first">Example (2.2) - Pass options through to aligner</p>
<div class="highlight-python"><div class="highlight"><pre>$ pbalign --algorithmOptions='-nCandidates 10 -sdpTupleSize 12' \
tests/data/example_read.fasta \
tests/data/example_ref.fasta \
example.sam
</pre></div>
</div>
</li>
<li><p class="first">Example (2.3) - Create a cmp.h5 file with –forQuiver option</p>
<div class="highlight-python"><div class="highlight"><pre># The output cmp.h5 file will loaded with quality values (pulses)
# from the input bas/bax.h5 file, sorted and repacked, and therefore
# can be consumed by Quiver directly, (Note that in order to use
# --forQuiver option, cmph5tools and h5repack are required.)
$ pbalign --forQuiver your_movie.bas.h5 your_reference.fasta out.cmp.h5
</pre></div>
</div>
</li>
</ul>
<ol class="arabic simple" start="3">
<li>Use pbalign as a library through Python API.</li>
</ol>
<ul>
<li><p class="first">Example (3.1)</p>
<div class="highlight-python"><div class="highlight"><pre>$ python
>>> from pbalign.pbalignrunner import PBAlignRunner
>>> # Specify arguments in a list.
>>> args = ['--maxHits', '20', 'tests/data/example_read.fasta',\
... 'tests/data/example_ref.fasta', 'example.sam']
>>> # Create a PBAlignRunner object.
>>> a = PBAlignRunner(args)
>>> # Execute.
>>> exitCode = a.start()
>>> # Show all files used.
>>> print a.fileNames
</pre></div>
</div>
</li>
</ul>
</div>
<div class="section" id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>usage: pbalign [-h] [--verbose] [--version] [--profile] [--debug]
[--regionTable REGIONTABLE] [--configFile CONFIGFILE]
[--algorithm {blasr,bowtie}] [--maxHits MAXHITS]
[--minAnchorSize MINANCHORSIZE]
[--useccs {useccs,useccsall,useccsdenovo}]
[--noSplitSubreads] [--nproc NPROC]
[--algorithmOptions ALGORITHMOPTIONS]
[--maxDivergence MAXDIVERGENCE] [--minAccuracy MINACCURACY]
[--minLength MINLENGTH]
[--scoreFunction {alignerscore,editdist,blasrscore}]
[--scoreCutoff SCORECUTOFF]
[--hitPolicy {randombest,allbest,random,all}] [--forQuiver]
[--seed SEED] [--tmpDir TMPDIR]
inputFileName referencePath outputFileName
Mapping PacBio sequences to references using an algorithm
selected from a selection of supported command-line alignment
algorithms. Input can be a fasta, pls.h5, bas.h5 or ccs.h5
file or a fofn (file of file names). Output is in either
cmp.h5 or sam format.
positional arguments:
inputFileName The input file can be a fasta, pls.h5, bas.h5, ccs.h5
file or a fofn.
referencePath Either a reference fasta file or a reference repository.
outputFileName The output cmp.h5 or sam file.
optional arguments:
-h, --help show this help message and exit
--verbose, -v Set the verbosity level
--version show program's version number and exit
--profile Print runtime profile at exit
--debug Run within a debugger session
--regionTable REGIONTABLE
Specify a region table for filtering reads.
--configFile CONFIGFILE
Specify a set of user-defined argument values.
--algorithm {blasr,bowtie}
Select an aligorithm from ('blasr', 'bowtie').
Default algorithm is blasr.
--maxHits MAXHITS The maximum number of matches of each read to the
reference sequence that will be evaluated. Default
value is 10.
--minAnchorSize MINANCHORSIZE
The minimum anchor size defines the length of the read
that must match against the reference sequence. Default
value is 12.
--useccs {useccs,useccsall,useccsdenovo}
Map the ccsSequence to the genome first, then align
subreads to the interval that the CCS reads mapped to.
useccs: only maps subreads that span the length of
the template.
useccsall: maps all subreads.
useccsdenovo: maps ccs only.
--noSplitSubreads Do not split reads into subreads even if subread
regions are available.
Default value is False.
--nproc NPROC Number of threads. Default value is 8.
--algorithmOptions ALGORITHMOPTIONS
Pass alignment options through.
--maxDivergence MAXDIVERGENCE
The maximum allowed percentage divergence of a read
from the reference sequence. Default value is 30.
--minAccuracy MINACCURACY
The minimum percentage accuracy of alignments that
will be evaluated. Default value is 70.
--minLength MINLENGTH
The minimum aligned read length of alignments that
will be evaluated. Default value is 50.
--scoreFunction {alignerscore,editdist,blasrscore}
Specify a score function for evaluating alignments.
alignerscore : aligner's score in the SAM tag 'as'.
editdist : edit distance between read and reference.
blasrscore : blasr's default score function.
Default value is alignerscore.
--scoreCutoff SCORECUTOFF
The worst score to output an alignment.
--hitPolicy {randombest,allbest,random,all}
Specify a policy for how to treat multiple hit
random : selects a random hit.
all : selects all hits.
allbest : selects all the best score hits.
randombest: selects a random hit from all best
alignment score hits.
Default value is randombest.
--forQuiver The output cmp.h5 file which will be sorted, loaded
with pulse information, and repacked, so that it
can be consumed by quiver directly. This requires
the input file to be in PacBio bas/pls.h5 format.
Default value is False.
--seed SEED Initialize the random number generator with a none-zero
integer. Zero means that current system time is used.
Default value is 1.
--tmpDir TMPDIR Specify a directory for saving temporary files.
Default is /scratch.
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">How to install and run pbalign</a><ul>
<li><a class="reference internal" href="#background">Background</a></li>
<li><a class="reference internal" href="#required-software">Required software</a></li>
<li><a class="reference internal" href="#required-libraries-and-tools">Required libraries and tools</a></li>
<li><a class="reference internal" href="#data-file-requirements">Data file requirements</a></li>
<li><a class="reference internal" href="#manual-installation-instructions">Manual installation instructions</a><ul>
<li><a class="reference internal" href="#step-1-set-up-your-python-virtual-environment">Step 1: Set up your Python virtual environment</a></li>
<li><a class="reference internal" href="#step-2-install-required-software-and-library">Step 2: Install required software and library</a></li>
<li><a class="reference internal" href="#step-3-install-optionally-required-software-and-library">Step 3: Install optionally required software and library</a></li>
<li><a class="reference internal" href="#step-4-install-pbalign">Step 4: Install pbalign</a></li>
</ul>
</li>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#usage">Usage</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">pbalign</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/howto.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="index.html" title="pbalign"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pbalign 0.5 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2013, 2013, pbiDevNet.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.4.
</div>
</body>
</html>
|