#!/usr/bin/perl

open (I, $ARGV[0]); # info_trackdb.txt
$head = <I>;
while (<I>){
	chomp;
	@arr = split (/\t/);
	print "track $arr[0]\n";
	print "longLabel $arr[0]\n";
	print "shortLabel $arr[0]\n";
	print "bigDataUrl $arr[0]\.$arr[1]\n";
	print "group $arr[3]\n";
	
	if ($arr[4] ne ''){
		print "color $arr[4]\n";
	}
	
	if ($arr[2] == 12){
		print "itemRgb on\n";
		print "type bigBed 12\n\n";
	}
	elsif ($arr[2] == 6){
		print "type bigBed 6\n\n";
	}
	elsif ($arr[2] == 5){
		print "type bigBed 5\n\n";
	}
	else {
		print "type bigWig\n\n";
	}
}
close I;


