#This is to re-analyze the fp-map using the new asite file. 220102.
geneList="fp_transcript_all_gene.txt"
geneID=( $(cut -d ',' -f1 ${geneList} ) )

genotype="R57C10_In_1"
mkdir "190919_Neuro_Glia/all_transcript_new_${genotype}"
for id in ${geneID[@]}
do
		echo "fp-transcript -o 190919_Neuro_Glia/all_transcript_new_${genotype}/${id}.txt -b 190919_Neuro_Glia/genome/dm6_ensemble.bed -a 190919_Neuro_Glia/asites_Neuro_Glia_new_In.txt -t ${id} -f 190919_Neuro_Glia/genome/dm6.fa 190919_Neuro_Glia/unique_fly/${genotype}_unique.bam &" >> fptranscriptcommands.sh
		echo "wait">>fptranscriptcommands.sh
done
source fptranscriptcommands.sh
rm *commands.sh

genotype="R57C10_In_2"
mkdir "190919_Neuro_Glia/all_transcript_new_${genotype}"
for id in ${geneID[@]}
do
		echo "fp-transcript -o 190919_Neuro_Glia/all_transcript_new_${genotype}/${id}.txt -b 190919_Neuro_Glia/genome/dm6_ensemble.bed -a 190919_Neuro_Glia/asites_Neuro_Glia_new_In.txt -t ${id} -f 190919_Neuro_Glia/genome/dm6.fa 190919_Neuro_Glia/unique_fly/${genotype}_unique.bam &" >> fptranscriptcommands.sh
		echo "wait">>fptranscriptcommands.sh
done
source fptranscriptcommands.sh
rm *commands.sh

genotype="Repo_In_1"
mkdir "190919_Neuro_Glia/all_transcript_new_${genotype}"
for id in ${geneID[@]}
do
		echo "fp-transcript -o 190919_Neuro_Glia/all_transcript_new_${genotype}/${id}.txt -b 190919_Neuro_Glia/genome/dm6_ensemble.bed -a 190919_Neuro_Glia/asites_Neuro_Glia_new_In.txt -t ${id} -f 190919_Neuro_Glia/genome/dm6.fa 190919_Neuro_Glia/unique_fly/${genotype}_unique.bam &" >> fptranscriptcommands.sh
		echo "wait">>fptranscriptcommands.sh
done
source fptranscriptcommands.sh
rm *commands.sh

genotype="Repo_In_2"
mkdir "190919_Neuro_Glia/all_transcript_new_${genotype}"
for id in ${geneID[@]}
do
		echo "fp-transcript -o 190919_Neuro_Glia/all_transcript_new_${genotype}/${id}.txt -b 190919_Neuro_Glia/genome/dm6_ensemble.bed -a 190919_Neuro_Glia/asites_Neuro_Glia_new_In.txt -t ${id} -f 190919_Neuro_Glia/genome/dm6.fa 190919_Neuro_Glia/unique_fly/${genotype}_unique.bam &" >> fptranscriptcommands.sh
		echo "wait">>fptranscriptcommands.sh
done
source fptranscriptcommands.sh
rm *commands.sh

genotype="CS"
mkdir "190919_Neuro_Glia/all_transcript_new_${genotype}"
for id in ${geneID[@]}
do
		echo "fp-transcript -o 190919_Neuro_Glia/all_transcript_new_${genotype}/${id}.txt -b 190919_Neuro_Glia/genome/dm6_ensemble.bed -a 190919_Neuro_Glia/asites_Neuro_Glia_new_In.txt -t ${id} -f 190919_Neuro_Glia/genome/dm6.fa 190919_Neuro_Glia/unique_fly/${genotype}_unique.bam &" >> fptranscriptcommands.sh
		echo "wait">>fptranscriptcommands.sh
done
source fptranscriptcommands.sh
rm *commands.sh