Category

Sequence Analysis


Usage

hgGcPercent [options] database nibDir


Manual

This tool is part of UCSC Genome Browser's utilities.

Required arguments

  • database file: A .2bit file, a directory that contains a database.2bit file, or a directory that contains *.nib files.
  • nibDir directory: The directory containing a .2bit file, or *.nib files, or a directory with a database.2bit file.

Options

  • -win size: Change windows size (default 20000).
  • -noLoad: Do not load MySQL table - create a bed file.
  • -file filename: Output to filename (stdout OK) (implies -noLoad). If not specified, the results will be written into a file called gcPercent.bed.
  • -chr chrN: Process only chrN from the nibDir.
  • -noRandom: Ignore random chromosomes from the nibDir.
  • -noDots: Do not display ... progress during processing.
  • -doGaps: Process gaps correctly (default: gaps are not counted as GC).
  • -wigOut: Output wiggle ASCII data ready to pipe to wigEncode.
  • -overlap N: Overlap windows by N bases (default 0).
  • -verbose N: Display details to stderr during processing. Set to 0, if you want the program to be quiet.
  • -bedRegionIn input.bed: Read in a bed file for GC content in specific regions and write to bedRegionsOut.
  • -bedRegionOut output.bed: Write a bed file of GC content in specific regions from bedRegionIn.

Examples

Default behavior
$ 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
Create a wiggle file for GC content
$ 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

 

File formats this tool works with
2bitnib

Share your experience or ask a question