From 90b3ee9b04bf5c15bf4537427a275e1df862b5de Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Mon, 14 Feb 2022 15:29:02 +0100 Subject: [PATCH] Do correct renaming of RPS12 genes if several Former-commit-id: 8ddbfaea302c440aa0992f3443632cf026b0d3a9 Former-commit-id: 2559779ab79d1b52d5193e1a60b443f6290dda48 --- detectors/cds/bin/do_rps12.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/detectors/cds/bin/do_rps12.sh b/detectors/cds/bin/do_rps12.sh index 39239b7..d5a3186 100755 --- a/detectors/cds/bin/do_rps12.sh +++ b/detectors/cds/bin/do_rps12.sh @@ -263,12 +263,13 @@ blastx \ # export PASS1_SPEEDUP=0 cp $DBROOT/Annot.lst RPS12 - + nbseq = 0 for fasta in rps12_fragments_*.fasta ; do tcsh -f ${PROG_DIR}/do_exonerate.csh \ $fasta \ "RPS12/rps12.fasta" \ $DBROOT/../models $(pwd) + ((nbseq=nbseq+1)) done # @@ -276,8 +277,9 @@ blastx \ # fragment to the chloroplaste genome coordinates # - + n=0 for f in *.res ; do + ((n=n+1)) mv $f $f.ori if [[ -z "$TEMP" ]] ; then dest="/dev/stdout" @@ -382,9 +384,17 @@ blastx \ $0 = line } {print $0} + ' | \ + $AwkCmd -v n=$n -v nbseq=$nbseq ' + /^FT +\/gene="rps12"/ && (nbseq > 1) { + sub(/rps12/,"rps12_" n,$0) + } + { + print $0 + } ' > $dest done - + popTmpDir