Permalink
Browse files

OGS now filtering by amino acid identity

- By default: 80%, controllable through project variable ogs_identity
  • Loading branch information...
lmrodriguezr committed Feb 1, 2019
1 parent 2e2b12e commit 4b07fcaca1502964ef5ff387f53b019a73472d44
Showing with 10 additions and 7 deletions.
  1. +6 −5 manual/part5/metadata.md
  2. +4 −2 scripts/ogs.bash
@@ -25,11 +25,12 @@ The following metadata fields are recognized by different interfaces for
| type* | String | [Type](../part2/types.md#project-types)
| plugins | Array of String | For internal control of plugins
| ref_project | Path to Project | Project with reference taxonomy
| tax_pvalue | Float [0,1] | Maximum p-value to transfer taxonomy
| aai_p | String | Value of -p for aai.rb[^2] on AAI
| haai_p | String | Value of -p for aai.rb[^2] on hAAI
| ani_p | String | Value of -p for ani.rb[^2] on ANI
| max_try | Integer | Max number of times a task is attempted
| tax_pvalue | Float [0,1] | Max p-value to transfer taxonomy (def: 0.05)
| aai_p | String | Value of aai.rb -p[^2] on AAI (def: blast+)
| haai_p | String | Value of aai.rb -p[^2] on hAAI (def: blast+)
| ani_p | String | Value of ani.rb -p[^2] on ANI (def: blast+)
| max_try | Integer | Max number of task attempts (def: 10)
| ogs_identity | Float [0,100] | Min RBM identity for OGS (def: 80)
| clean_ogs | Boolean | If false, keeps ABC (clades only)

\* Mandatory
@@ -11,15 +11,17 @@ cd "$PROJECT/data/10.clades/03.ogs"
# Initialize
miga date > "miga-project.start"

DS=$(miga list_datasets -P "$PROJECT" --ref --no-multi)
DS=$(miga ls -P "$PROJECT" --ref --no-multi)
MIN_ID=$(miga about -P "$PROJECT" -m ogs_identity)
[[ $MIN_ID == "?" ]] && MIN_ID=80
if [[ ! -s miga-project.ogs ]] ; then
# Extract RBMs
if [[ ! -s miga-project.abc ]] ; then
[[ -d miga-project.tmp ]] || mkdir miga-project.tmp
for i in $DS ; do
file="miga-project.tmp/$i.abc"
[[ -s "$file" ]] && continue
echo "SELECT seq1,id1,seq2,id2,bitscore from rbm;" \
echo "SELECT seq1,id1,seq2,id2,bitscore from rbm where id >= $MIN_ID;" \
| sqlite3 "../../09.distances/02.aai/$i.db" | tr "\\|" " " \
| awk '{ print $1">"$2"'"\\t"'"$3">"$4"'"\\t"'"$5 }' \
> "$file.tmp"

0 comments on commit 4b07fca

Please sign in to comment.