Reference Code backup Executable files
Calculate the GC (Guanine-Cytosine) percentage in windows of a specified size across a genome sequence
hgGcPercent [options] database nibDir
This tool is part of UCSC Genome Browser's utilities.
wigEncode
.$ hgGcPercent hg19 /data/ # Calculating gcPercent with window size 2000 # Using twoBit: /data/hg19.2bit ................................................................ ................................................................ ................................................................ ................................................................ ................................................................ # File gcPercent.bed created # Loading gcPercent table Can't start query: #Displays GC percentage in 20Kb blocks for genome CREATE TABLE gcPercent ( chrom varchar(255) not null, # Human chromosome number chromStart int unsigned not null, # Start position in genoSeq chromEnd int unsigned not null, # End position in genoSeq name varchar(255) not null, # Constant string GCpct gcPpt int unsigned not null, # GC percentage for 20Kb block #Indices UNIQUE(chrom(14),chromStart) ); $ head gcPercent.bed chr1 0 2000 GC 0 chr1 2000 4000 GC 0 chr1 4000 6000 GC 0 chr1 6000 8000 GC 0 chr1 8000 10000 GC 0 chr1 10000 12000 GC 595 chr1 12000 14000 GC 588 chr1 14000 16000 GC 602 chr1 16000 18000 GC 594 chr1 18000 20000 GC 585
$ hgGcPercent -wigOut -doGaps-win=5
-file=stdout
-verbose=0
hg19 /data | head variableStep chrom=chr1 span=5 10001 40 10006 40 10011 40 10016 60 10021 60 10026 60 10031 40 10036 40 10041 40
This command will also output wiggle ascii data ready to pipe to wigEncode
.
$ hgGcPercent -wigOut -doGaps-win=5
-file=stdout
-verbose=0
hg19 /data |wigEncode
stdin gc5Base.wig gc5Base.wib