in reply to Re: Adding a particular column from one file to a second file
in thread Adding a particular column from one file to a second file

Excellent!! what a useful thing to know. Ok this is probably a dumb question but why is it telling me
join -t '\t' -a1 -1 16 -2 2 PTCL_All.txt Cosmic_Counts_By_Gene.txt join: illegal tab character specification <\code> or <code>join -t '<tab>' -a1 -1 16 -2 2 PTCL_All.txt Cosmic_Counts_By_ +Gene.txt join: illegal tab character specification
Isn't -t ' CHAR' the correct format for specifying the delimiter in the output? Also if I use join  -t ',' -a1 -1 16 -2 2   PTCL_All.txt Cosmic_Counts_By_Gene.txt The output seems to be much more different than just a comma delimeter being added to the command  join   -a1 -1 16 -2 2   PTCL_All.txt Cosmic_Counts_By_Gene.txt Am I doing this correctly? the latter just looks like what I want with spaces separating the columns( the same number of lines as file 1), while the former seems to create a million repeats of each line (many many many more lines than what is in either file).

Replies are listed 'Best First'.
Re^3: Adding a particular column from one file to a second file
by ZWcarp (Beadle) on Jul 15, 2011 at 17:13 UTC
    I think this works though.... join   -a1 -1 16 -2 2   PTCL_All.txt Cosmic_Counts_By_Gene.txt |perl -pe 's/ /\t/g'