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

update gfaffix to v0.2.0 #1580

Merged
merged 4 commits into from
Jan 13, 2025
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
10 changes: 5 additions & 5 deletions build-tools/downloadPangenomeTools
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,12 @@ fi

# gfaffix
cd ${pangenomeBuildDir}
wget -q https://github.com/marschall-lab/GFAffix/releases/download/0.1.5b/GFAffix-0.1.5b_linux_x86_64.tar.gz
tar xzf GFAffix-0.1.5b_linux_x86_64.tar.gz
chmod +x GFAffix-0.1.5b_linux_x86_64/gfaffix
if [[ $STATIC_CHECK -ne 1 || $(ldd GFAffix-0.1.5b_linux_x86_64/gfaffix | grep so | wc -l) -eq 0 ]]
wget -q https://github.com/marschall-lab/GFAffix/releases/download/0.2.0/GFAffix-0.2.0_linux_x86_64.tar.gz
tar xzf GFAffix-0.2.0_linux_x86_64.tar.gz
chmod +x GFAffix-0.2.0_linux_x86_64/gfaffix
if [[ $STATIC_CHECK -ne 1 || $(ldd GFAffix-0.2.0_linux_x86_64/gfaffix | grep so | wc -l) -eq 0 ]]
then
mv GFAffix-0.1.5b_linux_x86_64/gfaffix ${binDir}
mv GFAffix-0.2.0_linux_x86_64/gfaffix ${binDir}
else
exit 1
fi
Expand Down
11 changes: 4 additions & 7 deletions src/cactus/refmap/cactus_graphmap_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,20 +685,17 @@ def clip_vg(job, options, config, vg_path, vg_id, phase):
normalized_path = vg_path + '.gfaffixed'
gfa_in_path = vg_path + '.gfa'
gfa_out_path = normalized_path + '.gfa'
# GFAffix's --dont_collapse option doesn't work on W-lines, so we strip them for now with -W
cactus_call(parameters=['vg', 'convert', '-W', '-f', vg_path], outfile=gfa_in_path, job_memory=job.memory)
fix_cmd = ['gfaffix', gfa_in_path, '--output_refined', gfa_out_path, '--check_transformation']
# GFAffix supports W-lines as reference paths since v0.2.0
cactus_call(parameters=['vg', 'convert', '-f', vg_path], outfile=gfa_in_path, job_memory=job.memory)
fix_cmd = ['gfaffix', gfa_in_path, '--output_refined', gfa_out_path, '--check_transformation', '--threads', str(job.cores)]
if options.reference:
fix_cmd += ['--dont_collapse', options.reference[0] + '#[.]*']
cactus_call(parameters=fix_cmd, job_memory=job.memory)
# GFAffix strips the header, until this is fixed we need to add it back (for the RS tag)
gfa_header = cactus_call(parameters=['head', '-1', gfa_in_path], check_output=True).strip()
cactus_call(parameters=['sed', '-i', gfa_out_path, '-e', '1s/.*/{}/'.format(gfa_header)])
# Come back from gfa to vg
conv_cmd = [['vg', 'convert', '-g', '-p', gfa_out_path]]
# GFAFfix doesn't unchop, so we do that in vg after
conv_cmd.append(['vg', 'mod', '-u', '-'])
cactus_call(parameters=conv_cmd, outfile=normalized_path)
cactus_call(parameters=conv_cmd, outfile=normalized_path)
vg_path = normalized_path

# run clip-vg no matter what, but we don't actually remove anything in full
Expand Down