BLAST.pl

#!/bin/bash

export PATH=/cursos/BI/bin/ncbiblast/bin:$PATH             
cp /cursos/BI/bin/ncbiblast/.ncbirc ~/                   

sequencies=~/novell/home/Bioinfo/Treball/Sequencies
resultats=~/novell/home/Bioinfo/Treball/Resultats

for genome in A.taiwanensis B.hominis C.merolae C.muris C.owczarzaki C.parvum E.siliculosus H.arabidopsidis N.gruberi P.pallidum P.tricornutum P.ultimum
S.parasitica T.trahens ; do { blastdb=`grep $genome /cursos/BI/genomes/protists/genomes_list_and_info.tab | cut -f 4`

	for proteines in `ls $sequencies`;
	do {
		mkdir -p "$resultats/blast";
		mkdir -p "$resultats/blast2";

		for especies in `ls $sequencies/$proteines`;
		do {
		
		      blastall -p tblastn -i $sequencies/$proteines/$especies -d $blastdb -o $resultats/blast/blast.$especies.$genome.fa -m9 -e 0.001
		      blastall -p tblastn -i $sequencies/$proteines/$especies -d $blastdb -o $resultats/blast2/blast2.$especies.$genome.fa

} done 
} done
} done