Add a patch for chloroplast annotation when no inverted repeats are

detected

Former-commit-id: 7e3ddd41cf0d0788223382fedbf45b183974233e
Former-commit-id: e5a8ceb825f78d243e37d22cd6b2e91f403c0ee8
This commit is contained in:
2016-05-02 15:32:28 +02:00
parent 8a1a1d57ba
commit 466308267e
3 changed files with 146 additions and 131 deletions

View File

@ -29,8 +29,10 @@ pushTmpDir ORG.ir
loginfo " --> $genome_length bp"
loginfo "Done"
IR=( $(lookForIR ${QUERY}) )
IRDetected=1
IR=( $(lookForIR ${QUERY}) ) || IRDetected=0
if (( IRDetected == 1 )) ; then
posIR1=${IR[4]}
posIR2=${IR[6]}
@ -57,7 +59,7 @@ pushTmpDir ORG.ir
echo "FT repeat_region ${posIR2}..${endIR2}"
echo "FT /rpt_type=INVERTED"
echo "FT /note=\"left inverted repeat A; IRA\""
fi
popTmpDir

View File

@ -41,7 +41,10 @@ pushTmpDir ORG.normalize
loginfo " --> $genome_length bp"
loginfo "Done"
IR=( $(lookForIR ${QUERY}) )
IRDetected=1
IR=( $(lookForIR ${QUERY}) ) || IRDetected=0
if (( IRDetected == 1 )) ; then
posIR1=${IR[4]}
posIR2=${IR[6]}
@ -162,7 +165,10 @@ pushTmpDir ORG.normalize
# Merges the four parts of the genome.
cat ${tmpLSC} ${tmpIR2} ${tmpSSC} ${tmpIR1} | joinfasta
else
# No IR detected --> normalization has no effect
cat ${QUERY}
fi
popTmpDir
exit 0

View File

@ -38,9 +38,16 @@ function lookForIR {
loginfo "Looking for long inverted repeats..."
repseek -c -p 0.001 -i ${QUERY} 2>> /dev/null > ${REPEATS}
loginfo " --> $(wc -l ${REPEATS} | awk '{print $1}') repeats identified"
nrepeat="$(wc -l ${REPEATS} | awk '{print $1}')"
loginfo "Done"
if (( nrepeat == 0 )) ; then
logwarning "No inverted repeat identified"
return 1
fi
loginfo " --> ${nrepeat} repeats identified"
loginfo "Marking and selecting the best inverted repeat..."
local IR=( $(${SELECTIR} ${MATCHES} ${REPEATS}) )
loginfo "Done"