Skip to content

Commit

Permalink
avoid the hg filter ani diff with high divergence; remove old paramet…
Browse files Browse the repository at this point in the history
…er from YML
  • Loading branch information
AndreaGuarracino committed May 5, 2024
1 parent a8cb62d commit 1b2e5f9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
13 changes: 10 additions & 3 deletions partition-before-pggb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ SEGMENT_LENGTH=5000
MAP_PCT_ID=90
MASH_KMER=19
MASH_KMER_THRES=0.001
HG_FILTER_ANI_DIFF=30

# wfmash's parameters
input_fasta=false
Expand All @@ -21,7 +20,7 @@ no_splits=false
sparse_map=false
mash_kmer=$MASH_KMER
mash_kmer_thres=$MASH_KMER_THRES
hg_filter_ani_diff=$HG_FILTER_ANI_DIFF
hg_filter_ani_diff=false
exclude_delim="#"

# seqwish's default values
Expand Down Expand Up @@ -347,6 +346,15 @@ if [[ $block_length == false ]]; then
block_length=$(echo "$segment_length * 5" | bc)
fi

if [[ $hg_filter_ani_diff == false ]]; then
if [[ $map_pct_id -ge 90 ]]; then
hg_filter_ani_diff=30
elif [[ $map_pct_id -lt 90 && $map_pct_id -ge 80 ]]; then
hg_filter_ani_diff=10
else
hg_filter_ani_diff=0
fi
fi

paf_spec=$mapper_letter-s$segment_length-l$block_length-p$map_pct_id-n$n_mappings-K$mash_kmer-F$mash_kmer_thres-x$sparse_map-g$hg_filter_ani_diff

Expand Down Expand Up @@ -483,7 +491,6 @@ general:
compress: $compress
threads: $threads
poa_threads: $poa_threads
respect_pansn: $respect_pansn
$mapper:
version: $mapper_version
segment-length: $segment_length
Expand Down
13 changes: 10 additions & 3 deletions pggb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ SEGMENT_LENGTH=5000
MAP_PCT_ID=90
MASH_KMER=19
MASH_KMER_THRES=0.001
HG_FILTER_ANI_DIFF=30

# wfmash's parameters
input_fasta=false
Expand All @@ -21,7 +20,7 @@ no_splits=false
sparse_map=false
mash_kmer=$MASH_KMER
mash_kmer_thres=$MASH_KMER_THRES
hg_filter_ani_diff=$HG_FILTER_ANI_DIFF
hg_filter_ani_diff=false
exclude_delim="#"

# seqwish's default values
Expand Down Expand Up @@ -347,6 +346,15 @@ if [[ $block_length == false ]]; then
block_length=$(echo "$segment_length * 5" | bc)
fi

if [[ $hg_filter_ani_diff == false ]]; then
if [[ $map_pct_id -ge 90 ]]; then
hg_filter_ani_diff=30
elif [[ $map_pct_id -lt 90 && $map_pct_id -ge 80 ]]; then
hg_filter_ani_diff=10
else
hg_filter_ani_diff=0
fi
fi

paf_spec=$mapper_letter-s$segment_length-l$block_length-p$map_pct_id-n$n_mappings-K$mash_kmer-F$mash_kmer_thres-x$sparse_map-g$hg_filter_ani_diff

Expand Down Expand Up @@ -483,7 +491,6 @@ general:
compress: $compress
threads: $threads
poa_threads: $poa_threads
respect_pansn: $respect_pansn
$mapper:
version: $mapper_version
segment-length: $segment_length
Expand Down

0 comments on commit 1b2e5f9

Please sign in to comment.