renameChromosomes.py

common.ngseq.renameChromosomes.py

This stand-alone script reads a simple tab-delimited conversion file that describes the conversion from a current chromosome naming convention to the desired naming convention, and then converts the header of an existing bamfile from the one, to the other. Optionally, the .bai index file is also generated for the resulting output bam file.

module_version:1.0
created_on:2013-07-16

Command-line Arguments

usage:
renameChromosomes.py :param: <input bam file> :param: <output bam file> :param: <input text file> -l|--log <file> [--index] [-v|--verbose] [--version] [--help]

Required Parameters

para:

<input bam file>

The input bam file

param:

<output bam file>

The output bam file

para:

<input text file>

A simple tab-delimited conversion file that describes the conversion from the current chromosome naming convention to the desired naming convention.

For example (A.thaliana):

Chr1 1 Chr2 2 Chr3 3 Chr4 4 Chr5 5 mitochondria Mt chloroplast Pt

--logfile|-l

The name (inc. path) of the log file from the wrapper.

Optional Parameter

--index|-i

Create the index file for the output bam file

--help|-h

Print a basic description of the tool and its options to STDOUT.

--version

Show program’s version number and exit.

--verbose|-v

Turn on verbose logging (recommended).

Output

A bam file with the new chromosome labels in the header.

Table Of Contents

Previous topic

switchStrand.py

Next topic

summarizeWigPerFeature.py

This Page