Does anybody know what is the best and trustable way to concatenate different FASTA files for making them index together?
thanks in advance
Does anybody know what is the best and trustable way to concatenate different FASTA files for making them index together?
thanks in advance
Just cat
them together. I am not sure what you mean by trustable
?
If you have spaces in the headers (e.g. words separated by names) make sure to change the space to _
. Most aligners will drop things past first space when reporting alignments (e.g. bbmap
is an exception and will keep the entire name by default unless you use trd=t
). You may get confusing results if the part of name up to first space is common to more than one record.
As Genomax commented :
In a unix shell :
cat file1.fasa file2.fastq file3.fasta > merged_file.fasta
or even easier if all your fasta files are in a directory and ends by .fasta
cat *.fasta > merged_file.fasta
I tend to remember that there were cases (also reported here on Biostars) when cat *.fasta
somehow caused an infinity loop because the output file would be constantly appended to itself (as it also ends on .fasta
). To avoid this, consider to use:
find . -maxdepth 1 -name \*.fasta | xargs cat > output.fasta
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
How do i delete all the fasta files with my info
Please ask a new question and give us as much information as you can. Do not add an answer unless you're answering the top-level post. I'm moving your "answer" to a comment and deleting the other duplicate "answer".
In this it would be "please give any information"...
nadiawerksfoon imagine you were in the situation of a user reading this and willing to help, could you reproduce at all what the problem is? At least I cannot. Probably others cannot as well. Add details!