text: user14278: I have seven fasta files, one per gene, with more than 400 fasta entries per file, like this:
  Input:
  Gene1.fasta
  >1721_1 gene name  
  ATG   
  >10_14 gene name  
  GTT
  
  Gene2.fasta
  >1721_1 gene name  
  TGA  
  >10_14 gene name   
  GAT
  
  Output:
  >1721_1  
  ATGTGA  
  >10_14   
  GTTGAT
  
  What I want to do is create one fasta (continuously) file containing seven genes per sample. As you can see, the sample name is not the same before the _ in the fasta headers.
  Is there any way to do this with awk or other command-line tools? Thank you very much.
  
  user15583: The concat command from seqkit could concatenate sequences with same ID from multiple files.
  seqkit concat [file1] [file2] ...
  
  
original_text: 14278: <p>I have seven fasta files, one per gene, with more than 400 fasta entries per file, like this:
  Input:</p>
  <p>Gene1.fasta</p>
  <pre><code>&gt;1721_1 gene name  
  ATG   
  &gt;10_14 gene name  
  GTT
  </code></pre>
  <p>Gene2.fasta</p>
  <pre><code>&gt;1721_1 gene name  
  TGA  
  &gt;10_14 gene name   
  GAT
  </code></pre>
  <p>Output:</p>
  <pre><code>&gt;1721_1  
  ATGTGA  
  &gt;10_14   
  GTTGAT
  </code></pre>
  <p>What I want to do is create one fasta (continuously) file containing seven genes per sample. As you can see, the sample name is not the same before the _ in the fasta headers.</p>
  <p>Is there any way to do this with awk or other command-line tools? Thank you very much.</p>
   15583: <p>The <code>concat</code> command from <a href="https://bioinf.shenwei.me/seqkit/" rel="nofollow noreferrer">seqkit</a> could concatenate sequences with same ID from multiple files.</p>
  <pre><code>seqkit concat [file1] [file2] ...
  </code></pre>
  