-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
corrects import fastas to take empty argument as nucl
if using *.fasta and *.fas it will do the same file twice therefore, changed to only *.fas* just to make sure same file is not created twice
- Loading branch information
1 parent
4d09641
commit 5012fa4
Showing
1 changed file
with
28 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
@echo off | ||
|
||
if [%1] == [] ( | ||
%1 = nucl | ||
) | ||
if "%1" == "" ( | ||
SET arg=nucl | ||
|
||
echo "Creating databases with default argument of '%arg%', if files have protein sequence use:" | ||
echo " import_fastas.bat prot" | ||
|
||
if NOT "%1" == "nucl" if NOT "%1" == "prot" ( | ||
echo "Error: ilegal value, expected 'nucl' or 'prot', not '%1%'" | ||
exit | ||
) else ( | ||
SET arg=%1 | ||
echo "Creating databases for %arg%." | ||
) | ||
|
||
for /r %%i in (*.fasta *.fna *.fas) do @makeblastdb -in %%i -dbtype "%1" -out "%%~ni" -title "%%~ni" | ||
if NOT "%arg%" == "nucl" ( | ||
if NOT "%arg%" == "prot" ( | ||
echo "Error: ilegal value, expected 'nucl' or 'prot', not '%arg%'" | ||
echo "" | ||
echo "Usage: (by default nucl)" | ||
echo " import_fastas.bat [nucl|prot]" | ||
) | ||
) ELSE ( | ||
|
||
echo "moving all files to ../db" | ||
move *.nhr ../db | ||
move *.nin ../db | ||
move *.nsq ../db | ||
move *.nal ../db | ||
move *.phr ../db | ||
move *.pin ../db | ||
move *.psq ../db | ||
move *.pal ../db | ||
for /r %%i in (*.fna *.fas*) do @makeblastdb -in %%i -dbtype "%arg%" -out "%%~ni" -title "%%~ni" | ||
|
||
echo "moving all files to ../db" | ||
move *.nhr ../db | ||
move *.nin ../db | ||
move *.nsq ../db | ||
move *.nal ../db | ||
move *.phr ../db | ||
move *.pin ../db | ||
move *.psq ../db | ||
move *.pal ../db | ||
) |