GenomeComb

cat

Format

cg cat ?options? file ?file? ...

Summary

Concatenate tab separated files and print on the standard output (stripping headers of files other than the first).

Description

Concatenate tab separated files and print on the standard output. Headers of tab files others than the first one will be stripped. If one of the tab file does not have the same fields as the first, an error is given, unless the merge or force options are used.

Arguments

file ...
files to be concatenated

Options

-m 0/1 (--merge)
if the merge option is given, tab files with different fields will be merged: The resulting tab file has each field that occurs in at least one of the source files. If a given field is not present in one of the source files, it will be empty for each line coming from this file.
-f 0/1 (--force)
if the force option is given, tab files with different fields will still be concatenated without error.
-s 0/1 (--sort)
if the sort option is given, the files will be sorted (natural sort order) before being concatenated. This is usefull for e.g. concatenating files split over chromosomes in the correct order.
-c m/0/1/f/n (--comments)
Determines what will be in the comments of the result file. if -c is m (default), the comments are merged (supposing they are using the genomecomb metadata in comments format as described in format_tsv) if -c is 1, the names of the files that are concatenated are added in the comment in addition to the comments of all source files. if 0 the comments of all source files are there, but no extra comments (file names) are added. You can use the value f to only display the comment of the first file, or n to leave out comments completely.
-n fieldname (--fieldname)
if -n is not empty, a column with the name fieldname will be added, that contains the filename where the line came from
-fullfilename 0/1
if 0 (default) only the tail of the filename is placed in the field given in the -n option, if 1, the full path to the file is used
-fields fields (--fields)
only return the given fields in the concatenated output
-catfiles 0/1
show concatenated files in merged header (only for -c m) under key catfiles (default 0)

Category

tsv