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

Biopiece: remove_ucsc_tracks

Description

remove_ucsc_tracks removes custom UCSC Genome Browser tracks (or tables) from both the MySQL database and configuration files. The database is specified with the -d switch and tracks to be removed can be specified with the -t switch and/or tracks are removed if they exactly match the value of given record keys of records in the stream.

NB! the config_file will be replaced with machine parsed results so that notes etc. is lost.

A backup configuration file is created with the a ~ suffix.

Usage

remove_ucsc_tracks [options] <-d <database>> <-t <tracks>>

or

... | remove_ucsc_tracks [options] <-d <database>> <-k <keys>>

Options

[-?          | --help]                #  Print full usage description.
[-d <string> | --database=<string>]   #  MySQL database.
[-t <list>   | --tracks=<list>]       #  Comma separated list of tracks.
[-k <list>   | --keys=<list>]         #  Comma separated list of keys.
[-c <file!>  | --config_file=<file!>] #  Configuration file           -  Default=~/ucsc/my_tracks.ra
[-u <string> | --user=<string>]       #  MySQL user name              -  Default=<fetched from .hg.conf>
[-p <string> | --password=<string>]   #  MySQL password               -  Default=<fetched from .hg.conf>
[-I <file!>  | --stream_in=<file!>]   #  Read input stream from file  -  Default=STDIN
[-O <file>   | --stream_out=<file>]   #  Write output stream to file  -  Default=STDOUT
[-v          | --verbose]             #  Verbose output.

Examples

To remove a specific track:

remove_ucsc_tracks -d dm3 -t mah_RM_new

To assimilate a list of tracks to remove do:

read_mysql -d dm3 -q 'show tables' | grab -p test_to_remove | remove_ucsc_tracks -d dm3 -k Tables_in_dm3 -x

Note that read_mysql with the show tables query outputs records of the type:

Tables_in_dm3: mah_test_to_remove
---

Thus we know that the -k value should be Tables_in_dm3.

See also

read_mysql

remove_mysql_tables

Author

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

[email protected]

November 2008

License

GNU General Public License version 2

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

Help

remove_ucsc_tracks is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally