text: user285: I have downloaded harmonised the TCGA-HNSC dataset and extracted it. It has 546 samples in total, so what I see in it are FPKM normalised values. The first column remains the same with 60000 rows and 2 columns that is first column ENSEMBL ID and second column FPKM value.
  So now the issue is I want to join all the 546 txt file into one where the first column remains the same and rest 546 column would be joined. I'm using this command:
  paste -d " " *txt > merged_file.txt
  
  This is joining the all the data sets as ENSEMBL ID and FPKM value..
  But I want 1st column as the ENSEMBLE ID and rest the sample FPKM any suggestion or help would be appreciated 
  
  user77: In R:
  flist = list.files("*.txt", path=".")
  fl = lapply(flist, function(x) read.delim(x, header=F))
  m = sapply(fl, function(x) x$V2)
  row.names(m) = fl[[1]]$V1
  colnames(m) = flist
  
  That will give you an appropriately formatted matrix named m in R, which is probably where you want to continue processing things anyway.
  
original_text: 285: <p>I have downloaded harmonised the TCGA-HNSC dataset and extracted it. It has 546 samples in total, so what I see in it are FPKM normalised values. The first column remains the same with 60000 rows and 2 columns that is first column ENSEMBL ID and second column FPKM value.</p>
  
  <p>So now the issue is I want to join all the 546 txt file into one where the first column remains the same and rest 546 column would be joined. I'm using this command:</p>
  
  <pre><code>paste -d " " *txt &gt; merged_file.txt
  </code></pre>
  
  <p>This is joining the all the data sets as ENSEMBL ID and FPKM value..</p>
  
  <p>But I want 1st column as the ENSEMBLE ID and rest the sample FPKM any suggestion or help would be appreciated </p>
   77: <p>In R:</p>
  
  <pre class="lang-r prettyprint-override"><code>flist = list.files("*.txt", path=".")
  fl = lapply(flist, function(x) read.delim(x, header=F))
  m = sapply(fl, function(x) x$V2)
  row.names(m) = fl[[1]]$V1
  colnames(m) = flist
  </code></pre>
  
  <p>That will give you an appropriately formatted matrix named <code>m</code> in R, which is probably where you want to continue processing things anyway.</p>
  