#!/usr/bin/env perl

# generates the karyotype file for CRI circos plot, eating 'byschool-dept-shortname-id.tsv'
# vomiting the karyotype skeleton file in the format of:
#  chr - ID LABEL START END COLOR

my %colors = (
"BIO" 		=> "green",
"DCB" 		=> "vlgreen",
"MBB" 		=> "lgreen",
"CHS" 		=> "blue",
"PharmSci" => "blue",
"CHEM" 	=> "vlorange",
"MATH" 	=> "lorange",
"ASTRO" 	=> "orange",
"BioMedEng" => "vlred",
"ChemEng" 	=> "lred",
"Anatomy" 	=> "vvlblue",
"BioChem" 	=> "vlblue",
"DERM" 	=> "lblue",
"MED" 		=> "blue",
"MMG" 		=> "dblue",
"NEURO" 	=> "vdblue",
"Path" 	=> "vvdblue",
"PhysBio" 	=> "vdblue",
"RadOnc" 	=> "dblue",
"SURG" 	=> "blue",
);

while (<>) {
    chomp;
    $N = @A = split(/\t/);
    
    print "chr - $A[3] $A[2] 1 100 $colors{$A[1]}\n";
}
