# script to create 2 column tab-delimited file: path, species

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

# add backbone mapping
BACKBONE="mayZeb2.0_ensembl"
BACKBONEDIR="$HOME/code/malawi_transposon/cloud/genome/longread-decompress/renamed/"
NUM_OF_BACKBONE_CHR=$(wc -l $BACKBONEDIR/{BACKBONE}.renamed.fa.fai | cut -f1 -d ' ') # cant figure out how to pipe this
paste <(cut -f1 $BACKBONEDIR/{BACKBONE}.renamed.fa.fai) <(printf 'backbone\n%.0s' {1..248}) > pav/graph_path_to_species.mapping

# add species assemblies
cut -f1 odgi/graph_paths.fa.fai | grep "_"  > tmp.txt
paste tmp.txt <(cut -f 1 -d '_' tmp.txt) >> pav/graph_path_to_species.mapping
rm tmp.txt

