Question: combining fasta files
0
gravatar for vigneshprbh37
5.8 years ago by
INDIA
vigneshprbh3730 wrote:

so i have around 149 fasta files of mouse genes cds sequences in fasta.txt format 

i have to combine them into a single file containing all the sequences and run it against a gene dataset that i downloaded from ensembl biomart

is there any shortcut command line i can use in cmd to combine all of them

 

or any way of doing them in less time 

any suggestions are appreciated

notepad windows fasta • 35k views
ADD COMMENTlink modified 5.8 years ago by ete100 • written 5.8 years ago by vigneshprbh3730
7
gravatar for rtliu
5.8 years ago by
rtliu2.1k
New Zealand
rtliu2.1k wrote:

The cat command is available as Powershell alias on Windows 7 and above. Press the Windows logo key + R, then type powershell and press Enter. Supposed your fasta files are located on d:\data,  just type:

cd d:\data
cat *.fasta.txt > d:\combined.fasta

For any serious bioinformatics analysis, learning linux command is a must.

 

 

 

 

 

 

ADD COMMENTlink modified 5.8 years ago • written 5.8 years ago by rtliu2.1k
1
gravatar for Ashutosh Pandey
5.8 years ago by
Philadelphia
Ashutosh Pandey12k wrote:

a) Create a new directory b) Move all the fasta files into the new directory c) Change directory to the new directory d) try this command: cat * >> one_big_file.txt  

ADD COMMENTlink written 5.8 years ago by Ashutosh Pandey12k
2

I suggest a slight change:

cat *.txt > big.fasta

If the file you create matches the pattern of the files you are concatenating, you can get into an infinite loop where the file you create is being concatenated to itself.  I've done this before :)

ADD REPLYlink written 5.8 years ago by Brian Bushnell17k

This was very useful!

ADD REPLYlink written 3.9 years ago by mollysil0

is not cat a linux command 

iam working on windows

do you know the equivalent command for windows

 

ADD REPLYlink written 5.8 years ago by vigneshprbh3730

"Any command-line or batch cmd to concatenate multiple files?" http://superuser.com/questions/111825/

ADD REPLYlink written 5.8 years ago by Pierre Lindenbaum131k
1
gravatar for biolab
5.8 years ago by
biolab1.2k
biolab1.2k wrote:

Your can achieve this under DOS.  Make a new folder and move all your files in.  Suppose all files end with .txt.  Then run copy *.txt merged.txt

Also I would like to note that learning some linux basics (shell commands, grep, awk) will much benefit your work.
 

ADD COMMENTlink written 5.8 years ago by biolab1.2k
0
gravatar for ete
5.8 years ago by
ete100
Germany
ete100 wrote:

You can use one of my software for this task, BlasterQt:

http://www.snowformatics.com/blaster.html

Have a look at the format converter tab. Let me know if you need further help.

Cheers,

Stefanie

 

ADD COMMENTlink written 5.8 years ago by ete100
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2258 users visited in the last hour