Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be smoother with the ANI filter in the mapping step #397

Merged
merged 1 commit into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading