Commands from section ‘information’

In this section we will require the following datasets:

$ gtftk get_example -q -d simple -f '*'
$ gtftk get_example -q -d mini_real -f '*'

apropos

Description: Search in all command description files those related to a user-defined keyword.

Example: Search all commands related to promoters.

$ gtftk apropos -k promoter
 |-- 10:51-INFO-apropos : >> Keyword 'promoter' was found in the following command:
	- coverage.
	- ologram.
	- divergent.

Arguments:

$ gtftk apropos -h
  Usage: gtftk apropos -k keyword [-n] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Search in all command description files those related to a user-defined keyword.

Arguments:
 -k, --keyword                The keyword (default: None)
 -n, --notes                  Look also for the keywords in notes associated to each command. (default: False)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

retrieve

Description: Retrieves a GTF file from ensembl.

Example: List the available GTF files in ensembl FTP. Bacteria are not listed at the moment.

$ # gtftk retrieve -l | head -5

Example: Perform basic statistics on Vicugna pacos genomic annotations.

$ # gtftk retrieve -s vicugna_pacos -c  -d | gtftk  count -t vicugna_pacos

Arguments:

$ gtftk retrieve -h
  Usage: gtftk retrieve [-s SPECIES] [-o GTF.GZ] [-e {vertebrate,protists,fungi,plants,metazoa}] [-r RELEASE] [-l] [-hs] [-c] [-d] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Retrieve a GTF file from ensembl.

Arguments:
 -s, --species-name           The species name. (default: homo_sapiens)
 -o, --outputfile             Output file (gtf.gz). (default: None)
 -e, --ensembl-collection     Which ensembl collection to interrogate('vertebrate', 'protists', 'fungi', 'plants', 'metazoa'). (default: vertebrate)
 -r, --release                Release number. By default, the latest. (default: None)
 -l, --list-only              If selected, list available species. (default: False)
 -hs, --hide-species-name     If selected, hide species names upon listing. (default: False)
 -c, --to-stdout              This option specifies that output will go to the standard output stream, leaving downloaded files intact (or not, see -d). (default: False)
 -d, --delete                 Delete the gtf file after processing (e.g if -c is used). (default: False)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

get_example

Description: Get an example GTF file (or any other kind of example available in the installation directory). This command is only provided for demonstration purpose.

We can see from the example below that this gtf file follows the ensembl format and contains the transcript and gene features (column 3).

Example: The very basic (and artificial) example.

$ gtftk get_example | head -2
chr1	gtftk	gene	125	138	.	+	.	gene_id "G0001";
chr1	gtftk	transcript	125	138	.	+	.	gene_id "G0001"; transcript_id "G0001T002";

let’s get all files from the simple dataset.

$ gtftk get_example -q -d simple -f '*'

Arguments:

$ gtftk get_example -h
  Usage: gtftk get_example [-d {simple,mini_real,mini_real_noov_rnd_tx,tiny_real,hg38_chr1,simple_02,simple_03,simple_04,simple_05,simple_06,simple_07,mini_real_10M,control_list,ologram_1,ologram_2,mini_real_ens}] [-f {*,gtf,bed,bw,bam,join,join_mat,chromInfo,tsv,fa,fa.idx,genes,geneList,2.bw,genome}] [-o OUTPUT] [-l] [-a] [-q] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Print example files including GTF.

  Notes:
     *  Use format '*' to get all files from a dataset.

Arguments:
 -d, --dataset                Select a dataset. (default: simple)
 -f, --format                 The dataset format. (default: gtf)
 -o, --outputfile             Output file. (default: <stdout>)
 -l, --list                   Only list files of a dataset. (default: False)
 -a, --all-dataset            Get the list of all datasets. (default: False)
 -q, --quiet                  Don't write any message when copying files. (default: False)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

add_exon_nb

Description: Add exon number transcript-wise (based on 5’ to 3’ orientation).

Example:

$ gtftk add_exon_nb -i simple.gtf -k exon_number | gtftk select_by_key -k feature -v exon | gtftk tabulate -k chrom,start,end,exon_number,transcript_id | head -n 20
seqid	start	end	exon_number	transcript_id
chr1	125	138	1	G0001T002
chr1	125	138	1	G0001T001
chr1	180	189	1	G0002T001
chr1	50	54	2	G0003T001
chr1	57	61	1	G0003T001
chr1	65	68	1	G0004T002
chr1	71	71	2	G0004T002
chr1	74	76	3	G0004T002
chr1	65	68	1	G0004T001
chr1	71	71	2	G0004T001
chr1	74	76	3	G0004T001
chr1	33	35	2	G0005T001
chr1	42	47	1	G0005T001
chr1	22	25	3	G0006T001
chr1	28	30	2	G0006T001
chr1	33	35	1	G0006T001
chr1	28	30	2	G0006T002
chr1	33	35	1	G0006T002
chr1	107	116	1	G0007T001

Arguments:

$ gtftk add_exon_nb -h
  Usage: gtftk add_exon_nb [-i GTF] [-o GTF] [-k exon_numbering_key] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Add exon number transcript-wise (based on 5' to 3' orientation).

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -k, --exon-numbering-key     The name of the key containing the exon numbering. (default: exon_nbr)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

count

Description: Count the number of features (transcripts, genes, exons, introns).

Example:

$ gtftk count -i simple.gtf -t example_gtf
gene	10	example_gtf
transcript	15	example_gtf
exon	25	example_gtf
CDS	20	example_gtf

Arguments:

$ gtftk count -h
  Usage: gtftk count [-i GTF] [-o TXT] [-d header] [-t TEXT] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Count the number of each features in the gtf file.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN. (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -d, --header                 A comma-separated list of string to use as header. (default: None)
 -t, --additional-text        A facultative text to be printed in the third column (e.g species name). (default: None)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

count_key_values

Description: Count the number of values for a set of keys.

Example: Count the number of non-redondant entries for chromosomes and transcript_id.

$ gtftk count_key_values -i simple.gtf -k chrom,transcript_id -u
chrom	1
transcript_id	15

Arguments:

$ gtftk count_key_values -h
  Usage: gtftk count_key_values [-i GTF] [-o TXT] [-k keys] [-t TEXT] [-u] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Count the number of values/levels for a set of keys.

  Notes:
     *  Use --uniq to get the count of non-redondant values.
     *  Not available values ('.') are not taken into account.
     *  Use "*" as the key to get the counts for all keys.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN. (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -k, --keys                   The set of keys of interest. (default: *)
 -t, --additional-text        A facultative text to be printed in the third column (e.g species name). (default: None)
 -u, --uniq                   Ask for the count of non redondant values. (default: False)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

get_attr_list

Description: Get the list of attributes from a GTF file.

Example: Get the list of attributes in the “simple” dataset.

$ gtftk get_attr_list -i simple.gtf
gene_id
transcript_id
exon_id
ccds_id

Arguments:

$ gtftk get_attr_list -h
  Usage: gtftk get_attr_list [-i GTF] [-o TXT] [-s SEP] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Get the list of attributes from a GTF file.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -s, --separator              The separator to be used for separating key names. (default: )

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

get_attr_value_list

Description: Get the list of values observed for an attributes.

Example: Get the number of time each gene_id is used.

$ gtftk get_attr_value_list -i simple.gtf -k gene_id -c -s ';'
G0001;7
G0002;4
G0003;5
G0004;13
G0005;5
G0006;13
G0007;7
G0008;5
G0009;7
G0010;4

Arguments:

$ gtftk get_attr_value_list -h
  Usage: gtftk get_attr_value_list [-i GTF] [-o TXT] -k key_name [-s separator] [-c] [-p] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Get the list of values observed for an attributes.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -k, --key-name               The comma separated list of key name. (default: None)
 -s, --separator              The separator used if -c or -p are true. (default: )
 -c, --count                  Add the counts for each key (separator will be set to ' ' by default). (default: False)
 -p, --print-key-name         Also print the key name in the first column. (default: False)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

get_feature_list

Description: Get the list of features enclosed in the GTF.

Example: Get the list of features enclosed in the GTF.

$ gtftk get_feature_list -i simple.gtf
gene
transcript
exon
CDS

Arguments:

$ gtftk get_feature_list -h
  Usage: gtftk get_feature_list [-i GTF] [-o TXT] [-s SEP] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Get the list of features enclosed in the GTF.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -s, --separator              The separator to be used for separating key names. (default: )

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

nb_exons

Description: Count the number of exons and add it as a novel key/value. Output may also be in text format if requested.

Example:

$ gtftk nb_exons -i simple.gtf | head -n 5
chr1	gtftk	gene	125	138	.	+	.	gene_id "G0001";
chr1	gtftk	transcript	125	138	.	+	.	gene_id "G0001"; transcript_id "G0001T002"; nb_exons "1";
chr1	gtftk	exon	125	138	.	+	.	gene_id "G0001"; transcript_id "G0001T002"; exon_id "G0001T002E001";
chr1	gtftk	CDS	125	130	.	+	.	gene_id "G0001"; transcript_id "G0001T002"; ccds_id "CDS_G0001T002";
chr1	gtftk	transcript	125	138	.	+	.	gene_id "G0001"; transcript_id "G0001T001"; nb_exons "1";

Arguments:

$ gtftk nb_exons -h
  Usage: gtftk nb_exons [-i GTF] [-o TXT/GTF] [-f] [-a key_name] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Returns the transcript name and number of exons with nb_exons as a novel key for each transcript
     feature.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -f, --text-format            Return a text format. (default: False)
 -a, --key-name               The name of the key. (default: nb_exons)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

nb_transcripts

Description: Count the number of transcript per gene.

Example: Count the number of transcript per gene.

$ gtftk nb_transcripts -i simple.gtf | gtftk select_by_key -g
chr1	gtftk	gene	125	138	.	+	.	gene_id "G0001"; nb_tx "2";
chr1	gtftk	gene	180	189	.	+	.	gene_id "G0002"; nb_tx "1";
chr1	gtftk	gene	50	61	.	-	.	gene_id "G0003"; nb_tx "1";
chr1	gtftk	gene	65	76	.	+	.	gene_id "G0004"; nb_tx "2";
chr1	gtftk	gene	33	47	.	-	.	gene_id "G0005"; nb_tx "1";
chr1	gtftk	gene	22	35	.	-	.	gene_id "G0006"; nb_tx "2";
chr1	gtftk	gene	107	116	.	+	.	gene_id "G0007"; nb_tx "2";
chr1	gtftk	gene	210	222	.	-	.	gene_id "G0008"; nb_tx "1";
chr1	gtftk	gene	3	14	.	-	.	gene_id "G0009"; nb_tx "2";
chr1	gtftk	gene	176	186	.	+	.	gene_id "G0010"; nb_tx "1";

Arguments:

$ gtftk nb_transcripts -h
  Usage: gtftk nb_transcripts [-i GTF] [-o GTF/TXT] [-f] [-a key_name] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Compute the number of transcript per gene.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -f, --text-format            Return a text format. (default: False)
 -a, --key-name               If gtf format is requested, the name of the key. (default: nb_tx)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

seqid_list

Description: Return the chromosome list.

Example: Return the chromosome list.

$ gtftk seqid_list -i simple.gtf
chr1

Arguments:

$ gtftk seqid_list -h
  Usage: gtftk seqid_list [-i GTF] [-o TXT] [-s SEP] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Select the seqid/chromosomes

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)
 -s, --separator              The separator to be used for separating key names. (default: )

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

tss_dist

Description: Compute the distance between TSSs of pairs of gene transcripts. The tss_num_1 and tss_num_2 columns contains the TSSs number (for transcript_id_1 and transcript_id_2 respectively). Numering starts from 1 (most 5’ TSS for a gene) to the number of different TSS coordinates. Two or more transcripts will have the same tss_num if they share a TSS.

Example: An example on the mini_real dataset.

$ gtftk random_list -i mini_real.gtf.gz -t gene -n 1 -s 2 | gtftk tss_dist
gene_id	transcript_id_1	transcript_id_2	dist	tss_num_1	tss_num_2
ENSG00000107829	ENST00000457105	ENST00000331272	36	1	2
ENSG00000107829	ENST00000331272	ENST00000470093	68360	2	4
ENSG00000107829	ENST00000331272	ENST00000482428	82106	2	5
ENSG00000107829	ENST00000331272	ENST00000489578	18545	2	3
ENSG00000107829	ENST00000457105	ENST00000470093	68396	1	4
ENSG00000107829	ENST00000457105	ENST00000482428	82142	1	5
ENSG00000107829	ENST00000457105	ENST00000489578	18581	1	3
ENSG00000107829	ENST00000470093	ENST00000482428	13746	4	5
ENSG00000107829	ENST00000489578	ENST00000470093	49815	3	4
ENSG00000107829	ENST00000489578	ENST00000482428	63561	3	5

Arguments:

$ gtftk tss_dist -h
  Usage: gtftk tss_dist [-i GTF] [-o TXT] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Computes the distance between TSSs of pairs of gene transcripts.

  Notes:
     *  The tss_num_1/tss_num_1 columns contains the numbering of TSSs (transcript_id_1 and
     transcript_id_2 respectively) for each gene.
     *  Numering starts from 1 (most 5' TSS) to the number of different TSS coordinates.
     *  Thus two or more transcripts will have the same tss_num if they share a TSS.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN. (default: <stdin>)
 -o, --outputfile             Output file. (default: <stdout>)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)

feature_size

Description: Get the size and limits (start/end) of features enclosed in the GTF. If bed format is requested returns the limits in bed format and the size as a score. Otherwise output GTF file with ‘feat_size’ as a new key and size as value

Example: Add trancript size (mature RNA) to the gtf.

$ gtftk feature_size -i simple.gtf -t mature_rna | gtftk select_by_key -k feature -v transcript | head -n 5
chr1	gtftk	transcript	125	138	.	+	.	gene_id "G0001"; transcript_id "G0001T002"; feat_size "14";
chr1	gtftk	transcript	125	138	.	+	.	gene_id "G0001"; transcript_id "G0001T001"; feat_size "14";
chr1	gtftk	transcript	180	189	.	+	.	gene_id "G0002"; transcript_id "G0002T001"; feat_size "10";
chr1	gtftk	transcript	50	61	.	-	.	gene_id "G0003"; transcript_id "G0003T001"; feat_size "10";
chr1	gtftk	transcript	65	76	.	+	.	gene_id "G0004"; transcript_id "G0004T002"; feat_size "8";

Arguments:

$ gtftk feature_size -h
  Usage: gtftk feature_size [-i GTF] [-o GTF/BED] [-t ft_type] [-n NAME] [-k KEY_NAME] [-s SEP] [-b] [-h] [-V [verbosity]] [-D] [-C] [-K tmp_dir] [-A] [-L logger_file] [-W write_message_to_file]

  Description: 

     Get the size and limits (start/end) of features enclosed in the GTF. The feature can be of any
     type (as found in the 3rd column of the GTF) or 'mature_rna' to get transcript size (i.e
     without introns). If bed format is requested returns the limits in bed format and the size as a
     score. Otherwise output GTF file with 'feat_size' as a new key and size as value.

Arguments:
 -i, --inputfile              Path to the GTF file. Default to STDIN (default: <stdin>)
 -o, --outputfile             Output file (BED). (default: <stdout>)
 -t, --ft-type                A target feature (as found in the 3rd column of the GTF) or 'mature_rna' to get transcript size (without introns). (default: transcript)
 -n, --names                  The key(s) that should be used as name if bed is requested. (default: transcript_id)
 -k, --key-name               Name for the new key if GTF format is requested. (default: feat_size)
 -s, --separator              The separator to be used for separating name elements (see -n). (default: |)
 -b, --bed                    Output bed format. (default: False)

Command-wise optional arguments:
 -h, --help                   Show this help message and exit.
 -V, --verbosity              Set output verbosity ([0-3]). (default: 0)
 -D, --no-date                Do not add date to output file names. (default: False)
 -C, --add-chr                Add 'chr' to chromosome names before printing output. (default: False)
 -K, --tmp-dir                Keep all temporary files into this folder. (default: None)
 -A, --keep-all               Try to keep all temporary files even if process does not terminate normally. (default: False)
 -L, --logger-file            Stores the arguments passed to the command into a file. (default: None)
 -W, --write-message-to-file  Store all message into a file. (default: None)