Commit d595607c authored by khalid's avatar khalid
Browse files

Add a solution to parse the contigs in the same order as in the config file

parent 97541c4d
......@@ -62,10 +62,13 @@ if [ $RECAT == "no" ]; then
# done
declare -A fasta_array
declare -a orders;
while IFS=$'\t' read fastaFile R1 R2
do
fastaName=`basename $fastaFile .fasta`
fasta_array[$fastaName]=$fastaFile";"$R1";"$R2
orders+=( fastaName ) #this will keep fastaFileNames in the same order as in config file
InfosCtg=(${fasta_array[$fastaName]//;/ }) #c'est un tableau
len=${#InfosCtg[@]}
if [ $len -gt 2 ]; then
......@@ -103,7 +106,8 @@ done < $CONFFILE
echo -e "\nIndex built : $out/$toolidx\n"
#for (( j=0; j <i; j++ ))
for ref in "${!fasta_array[@]}"
#for ref in "${!fasta_array[@]}"
for ref in "${orders[@]}"
do
#ref=${fasta_array[$j]};
refseqs=$out/$ref".ctgs"
......@@ -123,7 +127,8 @@ done < $CONFFILE
# mapping successively every read sets on all transcripts.
#for (( k=0; k <i; k++ ))
for ref in "${!fasta_array[@]}"
#for ref in "${!fasta_array[@]}"
for ref in "${orders[@]}"
do
InfosCtg=${fasta_array[$ref]}
#reads=${fasta_array[$k]}"_reads"
......@@ -203,7 +208,8 @@ done < $CONFFILE
# splitting "All_transcript.all" file into files corresponding to samples
#for (( j=0; j <i; j++ ))
for ref in "${!fasta_array[@]}"
#for ref in "${!fasta_array[@]}"
for ref in "${orders[@]}"
do
#ref=${fasta_array[$j]}
echo -e "\nCategorization of $ref transcripts"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment