Skip to content
Martin Asser Hansen edited this page Oct 2, 2015 · 6 revisions

Biopiece: calc_fixedstep

Description

calc_fixedstep uses BED, PSL, or other entries in the data stream containing chromosome coordinates to create fixedstep entries from the SCORE field. The entries can be output with write_fixedstep or used for the creation of Wiggle tracks in the UCSC genome browser with upload_to_ucsc.

The fixedstep scores are calculated as the sum of the SCOREs of overlapping entries:

    ==========      BED entry1 Q_ID 1
     ==========     BED entry2 Q_ID 2
      ==========    BED entry3 Q_ID 3
    136666666653    fixedstep scores

If there is no SCORE field, 1 is used:

    ==========      BED entry1
     ==========     BED entry2
      ==========    BED entry3
    123333333321    fixedstep scores

See the Examples section for more details.

For more about fixedstep and Wiggle format:

http://genome.ucsc.edu/goldenPath/help/wiggle.html

Usage

... | calc_fixexstep [options]

Options

[-?         | --help]               #  Print full usage description.
[-C         | --check]              #  Check the integrity of the records.
[-l         | --log10]              #  Use log10 fixedstep scores.
[-I <file!> | --stream_in=<file!>]  #  Read input from stream file  -  Default=STDIN
[-O <file>  | --stream_out=<file>]  #  Write output to stream file  -  Default=STDOUT
[-v         | --verbose]            #  Verbose output.

Examples

Consider the following BED entries in the file test.bed:

chr1   10   20
chr1   11   21
chr1   12   22

To calculate fixedstep entries first read them in with read_bed:

read_bed -i test.bed | calc_fixedstep

STEP: 1
CHR_BEG: 10
VALS: 1;2;3;3;3;3;3;3;3;3;2;1
CHR: chr1
REC_TYPE: fixed_step
---

If the BED entries contain a SCORE field it is used for calculating the fixedStep values. Consider the following BED entries in test.bed:

chr1   10   20   idA   1
chr1   11   21   idB   2
chr1   12   22   idC   3
read_bed -i test.bed | calc_fixedstep

STEP: 1
CHR_BEG: 10
VALS: 1;3;6;6;6;6;6;6;6;6;5;3
CHR: chr1
REC_TYPE: fixed_step
---

To output the fixedstep entries use write_fixedstep.

To create a Wiggle track in the UCSC genome browser use upload_to_ucsc.

See also

read_bed

read_fixedstep

write_fixedstep

upload_to_ucsc

Author

Martin Asser Hansen - Copyright (C) - All rights reserved.

[email protected]

September 2008

License

GNU General Public License version 2

http://www.gnu.org/copyleft/gpl.html

Help

calc_fixedstep is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally