Combine multiple fasta files in galaxy?
2
0
Entering edit mode
7.8 years ago
ando.kelli ▴ 60

Hi there,

I have a few hundred fasta files that I need to combine into a single fasta file. I thought it would be a relatively straight forward thing to do in Galaxy, but is proving to be a bit of a pain.

I was hoping to do this in Galaxy as I don't have command line experience.

Anyone know of a way to do this in Galaxy?

fasta galaxy • 5.7k views
ADD COMMENT
1
Entering edit mode

You could do this in Windows (combining fasta files ) or linux/OS X (cat *.fa > new_dir/combined.fa).
If you want to do this in galaxy then perhaps this way: https://biostar.usegalaxy.org/p/8324/ (which may prove to be a huge pain).

ADD REPLY
0
Entering edit mode
7.8 years ago
Peter 6.0k

The Galaxy concatenate datasets tool ought to work nicely here (assuming you don't have any bad FASTA files missing a trailing new line character), essentially the command line tool cat wrapped for use within Galaxy.

ADD COMMENT
0
Entering edit mode
7.5 years ago
ando.kelli ▴ 60

Hi all,

I've ended up learning how to do all of my NGS analysis in a Linux environment (with some occasional text manipulation in Galaxy). For those who are daunted by the prospect like I was, I'd encourage you to get stuck in as it's made my life a lot easier (after an initial phase of constant Googling and confusion) :-) Github will be your best friend when looking for scripts/workflows.

To join the fasta files I did the following:

Make sure you are in the right directory (folder with your fasta files)

then:

cat *.fasta > combined.fasta

Using the * will combine all of the .fasta files in your current directory. If you don't want to join all of the files in the directory then be more selective like this:

cat fileone.fasta filetwo.fasta filethree.fasta > combined.fasta

you can also define where you want your output saved if you don't want it saved to the folder you're working in:

cat *.fasta > path/combined.fasta

Hope that helps :-)

Kel

ADD COMMENT
1
Entering edit mode

Good for you. Now that you have learned the power of command line there is no going back :-)

ADD REPLY

Login before adding your answer.

Traffic: 1755 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6