-
Notifications
You must be signed in to change notification settings - Fork 23
get_fixedstep
Martin Asser Hansen edited this page Oct 2, 2015
·
6 revisions
get_fixedstep. The subsets can be obtained explicitly or from BED/PSL/BLAST entries in the stream.
get_fixedstep [options] <-i index> <-c chrom> <-b chrom begin> <-e chrom end>
or
... | get_fixedstep [options] <-i index>
[-? | --help] # Print full usage description.
[-c <string> | --chr=<string>] # Explicit chromosome name.
[-b <uint> | --beg=<uint>] # Begin position of subset (1-based).
[-e <uint> | --end=<uint>] # End position of subset.
[-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.
Consider the following fixedstep entry in the file test.wig
:
fixedStep chrom=chrY start=6524 step=1
0.287
0.456
0.567
0.640
0.687
0.717
0.736
0.747
0.752
First, we need an index which we make with create_fixedstep_index:
read_fixedstep -i test.wig | create_fixedstep_index -d my_dir -i my_index -x
This creates the index files:
my_dir/my_index.index
my_dir/my_index.wig
Now, we can make a lookups in two different ways, explictly:
get_fixedstep -i my_dir/my_index -c chrY -b 1 -e 10000
STEP: 1
CHR_BEG: 6523
REC_TYPE: fixed_step
VALS: 0.287;0.456;0.567;0.640;0.687;0.717;0.736;0.747;0.752
CHR: chrY
---
Alternatively, if you have e.g. a BED file (or PSL or BLAST or similar) which
generates a stream with CHR
, CHR_BEG
, and CHR_END
keys you can do this
with this BED entry from the file test.bed
:
chrY 6524 65299
And:
read_bed -i test.bed | get_fixedstep -i my_dir/my_index
STEP: 1
CHR_BEG: 6524
REC_TYPE: fixed_step
VALS: 0.456;0.567;0.640;0.687;0.717;0.736;0.747;0.752
CHR: chrY
---
Martin Asser Hansen - Copyright (C) - All rights reserved.
June 2010
GNU General Public License version 2
http://www.gnu.org/copyleft/gpl.html
get_fixedstep is part of the Biopieces framework.