title: R: How to use output of 'translate' function to write a table?
body: <p>I have a file (<a href="http://www.mediafire.com/view/629mzqqjtl471qi/data.txt" rel="nofollow">data.txt</a>) that contains 2 DNA sequences (ORF):</p>
  
  <pre><code>data = readDNAStringSet(file="data.txt") 
  data
  # A DNAStringSet instance of length 2
  # width seq                                                       names
  #[1]  57 ATGACCCCCACCTCCATCCCCACACTTCTATCCCGCTGCCCCGCCTCTCTCCCCTAA  GPG
  #[2]  54 ATGACCCATGAGCACCATGCAGCCAAAACCCTGGGAATCGGCAAAGCCATCTAG     PfK
  </code></pre>
  
  <p>I want to convert them to aminoacids: </p>
  
  <pre><code>t=vector(mode="list", length=length(data))
  for (i in seq_along(data))
  {
  t[[i]]=translate(data[[i]])
  }
  t
  #[[1]]
  #19-letter "AAString" instance
  #seq: MTPTSIPTLLSRCPASLP*
  
  #[[2]]
  #18-letter "AAString" instance
  #seq: MTHEHHAAKTLGIGKAI*
  </code></pre>
  
  <p>then write a table and have an output using:</p>
  
  <pre><code>tt=do.call(rbind,t)
  write.table(tt,"aa.txt",sep="\t\t")
  </code></pre>
  
  <p>but these commands don't work. I couldn't find the problem. How can I write a table?</p>
  
  <p>Note: <code>translate</code> is a function from the [<strong><code>seqinr</code></strong>] and <code>readDNAStringSet</code> is a function from the [<strong><code>Biostrings</code></strong>].</p>