Skip to content

Commit

Permalink
Merge pull request #185 from pangenome/one_graph
Browse files Browse the repository at this point in the history
output only one `final` graph
  • Loading branch information
AndreaGuarracino committed Apr 16, 2022
2 parents c460c91 + 09e93e5 commit b521a84
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pggb
Original file line number Diff line number Diff line change
Expand Up @@ -452,18 +452,16 @@ do
fi
done

prefix_final_graph="$prefix_smoothed".smooth.final
if [[ $normalize == true ]];
then
prefix_final_graph="$prefix_smoothed".smooth.fix

# Remove redundancy and sort
( $timer -f "$fmt" gfaffix "$prefix_smoothed".smooth.gfa -o "$prefix_final_graph".gfa | $timer -f "$fmt" pigz >"$prefix_final_graph".affixes.tsv.gz ) 2> >(tee -a "$log_file")
( $timer -f "$fmt" odgi build -t $threads -P -g "$prefix_final_graph".gfa -o - -O \
| $timer -f "$fmt" odgi sort -P -p Ygs -t $threads -i - -o "$prefix_final_graph".og ) 2> >(tee -a "$log_file")
( $timer -f "$fmt" odgi view -i "$prefix_final_graph".og -g >"$prefix_final_graph".gfa ) 2> >(tee -a "$log_file")
else
prefix_final_graph="$prefix_smoothed".smooth

mv "$prefix_smoothed".smooth.gfa "$prefix_final_graph".gfa
$timer -f "$fmt" odgi build -t $threads -P -g "$prefix_final_graph".gfa -o "$prefix_final_graph".og 2> >(tee -a "$log_file")
fi

Expand Down Expand Up @@ -623,8 +621,9 @@ fi
if [[ $keep_intermediate_files != true ]];
then
rm -f "$prefix_seqwish".seqwish.{gfa,og}
rm -f "$prefix_smoothed".smooth.[0-9]*.{gfa,og}

if [[ $normalize == true ]] && [[ $write_maf == false ]];
if [[ $normalize == true ]];
then
rm -f "$prefix_smoothed".smooth.{gfa,og}
fi
Expand Down

0 comments on commit b521a84

Please sign in to comment.