# extract core and flexible segment coordinates into BED files

GRAPHDIR="$HOME/code/malawi_transposon/cloud/graph_genome/malawi_haplochromines_zebra/"
cd $GRAPHDIR/pseudoreference/pav/

grep 'True' graph_bbsegments_coverage.csv | \
    awk -F "," 'BEGIN {FS=","} ; {print $2 "\t" $3 "\t" $4 "\t" $1 "\t" $12 }' \
    > graph_bb.nodes.core.bed

grep 'False' graph_bbsegments_coverage.csv | \
    awk -F "," 'BEGIN {FS=","} ; {print $2 "\t" $3 "\t" $4 "\t" $1 "\t" $12 }' \
    > graph_bb.nodes.flex.bed

