Skip to content

Commit

Permalink
keep only one graph at the end. The final graph name ends with '.final'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGuarracino committed Apr 16, 2022
1 parent b4d198b commit 09e93e5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 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 @@ -625,11 +623,10 @@ 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

fi

if [[ $compress == true ]];
Expand Down

0 comments on commit 09e93e5

Please sign in to comment.