Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bedtools2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R3
legacy
bedtools2
Commits
74c5764a
Commit
74c5764a
authored
12 years ago
by
Aaron
Browse files
Options
Downloads
Patches
Plain Diff
[DOCS] updated slop docs
parent
dc021543
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/content/images/tool-glyphs/slop-glyph.png
+0
-0
0 additions, 0 deletions
docs/content/images/tool-glyphs/slop-glyph.png
docs/content/tools/slop.rst
+84
-27
84 additions, 27 deletions
docs/content/tools/slop.rst
with
84 additions
and
27 deletions
docs/content/images/tool-glyphs/slop-glyph.png
0 → 100644
+
0
−
0
View file @
74c5764a
20.9 KiB
This diff is collapsed.
Click to expand it.
docs/content/tools/slop.rst
+
84
−
27
View file @
74c5764a
###############
###############
*slop*
*slop*
###############
###############
**slopBed** will increase the size of each feature in a feature file be a user-defined number of bases. While
something like this could be done with an "**awk '{OFS="\t" print $1,$2-<slop>,$3+<slop>}'**",
|
**slopBed** will restrict the resizing to the size of the chromosome (i.e. no start < 0 and no end >
chromosome size).
.. image:: ../images/tool-glyphs/intersect-glyph.png
:width: 600pt
|
``bedtools slop`` will increase the size of each feature in a feature file be a
user-defined number of bases. While something like this could be done with an
``awk '{OFS="\t" print $1,$2-<slop>,$3+<slop>}'``,
``bedtools slop`` will restrict the resizing to the size of the chromosome
(i.e. no start < 0 and no end > chromosome size).
.. note::
In order to prevent the extension of intervals beyond chromosome boundaries,
``bedtools slop`` requires a *genome* file defining the length of each
chromosome or contig.
==========================================================================
==========================================================================
Usage and option summary
Usage and option summary
==========================================================================
==========================================================================
Usage:
**
Usage
**
:
::
::
slopBed [OPTIONS] -i <BED/GFF/VCF> -g <GENOME> [-b or (-l and -r)]
bedtools slop [OPTIONS] -i <BED/GFF/VCF> -g <GENOME> [-b or (-l and -r)]
**(or):**
bedtools slop [OPTIONS] -i <BED/GFF/VCF> -g <GENOME> [-b or (-l and -r)]
=========================== ===============================================================================================================================================================================================================
=========================== ===============================================================================================================================================================================================================
Option Description
Option Description
=========================== ===============================================================================================================================================================================================================
=========================== ===============================================================================================================================================================================================================
...
@@ -21,6 +41,8 @@ Usage:
...
@@ -21,6 +41,8 @@ Usage:
**-l** The number of base pairs to subtract from the start coordinate. *Integer*.
**-l** The number of base pairs to subtract from the start coordinate. *Integer*.
**-r** The number of base pairs to add to the end coordinate. *Integer*.
**-r** The number of base pairs to add to the end coordinate. *Integer*.
**-s** Define -l and -r based on strand. For example. if used, -l 500 for a negative-stranded feature, it will add 500 bp to the *end* coordinate.
**-s** Define -l and -r based on strand. For example. if used, -l 500 for a negative-stranded feature, it will add 500 bp to the *end* coordinate.
**-pct**
**-header**
=========================== ===============================================================================================================================================================================================================
=========================== ===============================================================================================================================================================================================================
...
@@ -28,57 +50,92 @@ Usage:
...
@@ -28,57 +50,92 @@ Usage:
==========================================================================
==========================================================================
Default behavior
Default behavior
==========================================================================
==========================================================================
By default, **slopBed** will either add a fixed number of bases in each direction (**-b**) or an asymmetric
By default, ``bedtools slop`` will either add a fixed number of bases in each
number of bases in each direction (**-l** and **-r**).
direction (``-b``) or an asymmetric number of bases in each direction
with ``-l`` and ``-r``.
For example:
::
.. code-block:: bash
cat A.bed
$ cat A.bed
chr1 5 100
chr1 5 100
chr1 800 980
chr1 800 980
cat my.genome
$
cat my.genome
chr1 1000
chr1 1000
slop
Bed
-i A.bed -g my.genome -b 5
$ bedtools
slop -i A.bed -g my.genome -b 5
chr1 0 105
chr1 0 105
chr1 795 985
chr1 795 985
slop
Bed
-i A.bed -g my.genome -l 2 -r 3
$ bedtools
slop -i A.bed -g my.genome -l 2 -r 3
chr1 3 103
chr1 3 103
chr1 798 983
chr1 798 983
However, if the requested number of bases exceeds the boundaries of the chromosome, **slopBed** will
However, if the requested number of bases exceeds the boundaries of the
"clip" the feature accordingly.
chromosome, ``bedtools slop`` will "clip" the feature accordingly.
::
cat A.bed
.. code-block:: bash
$ cat A.bed
chr1 5 100
chr1 5 100
chr1 800 980
chr1 800 980
cat my.genome
$
cat my.genome
chr1 1000
chr1 1000
slop
Bed
-i A.bed -g my.genome -b 5000
$ bedtools
slop -i A.bed -g my.genome -b 5000
chr1 0 1000
chr1 0 1000
chr1 0 1000
chr1 0 1000
==========================================================================
==========================================================================
Resizing features according to strand
``-s``
Resizing features according to strand
==========================================================================
==========================================================================
**slop
Bed
** will optionally increase the size of a feature based on strand.
**
bedtools
slop** will optionally increase the size of a feature based on strand.
For example:
For example:
::
cat A.bed
.. code-block:: bash
$ cat A.bed
chr1 100 200 a1 1 +
chr1 100 200 a1 1 +
chr1 100 200 a2 2 -
chr1 100 200 a2 2 -
cat my.genome
$
cat my.genome
chr1 1000
chr1 1000
slop
Bed
-i A.bed -g my.genome -l 50 -r 80 -s
$ bedtools
slop -i A.bed -g my.genome -l 50 -r 80 -s
chr1 50 280 a1 1 +
chr1 50 280 a1 1 +
chr1 20 250 a2 2 -
chr1 20 250 a2 2 -
==========================================================================
``-pct`` Resizing features by a given fraction
==========================================================================
**bedtools slop** will optionally increase the size of a feature by a
user-specific fraction.
For example:
.. code-block:: bash
$ cat A.bed
chr1 100 200 a1 1 +
$ bedtools slop -i A.bed -g my.genome -b 0.5 -pct
chr1 50 250 a1 1 +
$ bedtools slop -i a.bed -l 0.5 -r 0.0 -pct -g my.genome
chr1 50 200 a1 1 +
==========================================================================
``-header`` Print the header for the A file before reporting results.
==========================================================================
By default, if your A file has a header, it is ignored when reporting results.
This option will instead tell bedtools to first print the header for the
A file prior to reporting results.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment