Skip to content

Commit

Permalink
improve echo
Browse files Browse the repository at this point in the history
  • Loading branch information
mattilalab committed Jan 24, 2022
1 parent 9be988d commit b948334
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion functions/chi2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Calculate background for each protein pair (Prot 1 -> Prot 2) after our filtering
calc_back_final() {
local PROTCHI="${1}"
echo "$PROTCHI"
echo -e "[CHI SQUARE] ${PROTCHI%.*.*}"

cat $PROTCHI | while read -r Seq1 Seq2 numPairs totalComp ; do
back_calc=$(printf "%1.10f" `echo "($numPairs)/($totalComp)" |bc -l`)
Expand Down
6 changes: 3 additions & 3 deletions functions/results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ results_cleanup() {

# "Forward" Protein A vs Protein B
cp ${PROTEINONE%.*}.fa_${PROTEINTWO%.*}.fa.out ${PROTEINONE%.*}_${PROTEINTWO%.*}.clean
echo "Clean up ${PROTEINONE%.*}_${PROTEINTWO%.*}.out"
echo -e "[CLEANINGUP] ${PROTEINONE%.*}_${PROTEINTWO%.*}.out"
sed -i -n '/Coevolving Pairs of amino acid sites/,/Overlapping groups of coevolving residues/p' ${PROTEINONE%.*}_${PROTEINTWO%.*}.clean
sed -i '1,5d' ${PROTEINONE%.*}_${PROTEINTWO%.*}.clean
sed -i 's/Overlapping groups of coevolving residues//' ${PROTEINONE%.*}_${PROTEINTWO%.*}.clean
Expand All @@ -121,7 +121,7 @@ results_cleanup() {

# "Reverse" Protein B vs Protein A
cp ${PROTEINTWO%.*}.fa_${PROTEINONE%.*}.fa.out ${PROTEINTWO%.*}_${PROTEINONE%.*}.clean
echo "Clean up ${PROTEINTWO%.*}_${PROTEINONE%.*}.out"
echo "[CLEANINGUP] ${PROTEINTWO%.*}_${PROTEINONE%.*}.out"
sed -i -n '/Coevolving Pairs of amino acid sites/,/Overlapping groups of coevolving residues/p' ${PROTEINTWO%.*}_${PROTEINONE%.*}.clean
sed -i '1,5d' ${PROTEINTWO%.*}_${PROTEINONE%.*}.clean
sed -i 's/Overlapping groups of coevolving residues//' ${PROTEINTWO%.*}_${PROTEINONE%.*}.clean
Expand Down Expand Up @@ -374,7 +374,7 @@ protein_pairs_stats() {

# Collect data in a single file, which can be imported in Cytoscape
echo "$msa_1 $msa_2 $coevThr $averR $averSigR $totCompar $sitesCountA $sitesCountB $gblocksMIN $gblocksMAX $gblocksMEAN $GapsMIN $GapsMAX $GapsMEAN $DivsMIN $DivsMAX $DivsMEAN $cCoevMIN $cCoevMAX $cCoevMEAN $bootMIN $bootMAX $bootMEAN $pMeanMIN $pMeanMAX $pMeanMEAN $BonferroniMIN $BonferroniMAX $BonferroniMEAN $chiboth_fin" >> $EOUT
echo "${msa_1} ${msa_2} added"
echo -e "[COEVOL ADD] ${msa_1} ${msa_2}"

cd ..

Expand Down

0 comments on commit b948334

Please sign in to comment.