0

My question is regarding concatenating two gene sequences into a combined file. Here are four of example file names

IMB211_trasncripts.renamed-20175.fa
IMB211_trasncripts.renamed-20176.fa
R500_trasncripts.renamed-20175.fa
R500_trasncripts.renamed-20176.fa

Basically i want to concatenate IMB211_trasncripts.renamed-20175.fa with R500_trasncripts.renamed-20175.fa and IMB211_trasncripts.renamed-20176.fa with R500_trasncripts.renamed-20176.fa. I know this is simple using cat command.

cat MB211_trasncripts.renamed-20175.fa R500_trasncripts.renamed-20175.fa > test_comb-20175.fa

However i have around 40 thousand genes like these (each for IMB211 and R500) and so i am wondering is there a easy way around to concatenate these files into one file specific for each gene id?

Thanks

upendra
  • 2,141
  • 9
  • 39
  • 64
  • 1
    You any good with scripting? Seems like there's a reasonably simple solution involving bash; use [parameter expansion](http://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html) and `uniq` to generate the list of suffixes and prefixes, then loop over both to create the new sequences. – Matthew G. May 06 '14 at 23:08
  • 1
    You could also pass the files *.fa to cat to concatenate in a script (I am not sure how to do it in a command line) – llrs May 28 '14 at 13:29

0 Answers0