for i in /sf/storage/gmo/hic/out/by_Project/DAX1/U87/*hg38*; do
	shopt -s nocasematch
	extension="${i##*.}"
	t="Unknown"
	
	if [[ $extension =~ "bw" || $extension =~ "bigwig" ]]
	then
		t="bigWig"
	fi
	
	if [[ $extension =~ "hic" ]]
        then
                t="hic"
        fi

        #if [[ $extension =~ "bed" ]]
        #then
#		continue
                # t="bigBed 4"
#        fi

        if [[ $extension =~ "bigBed" ]]
        then
                t="bigBed 4"
        fi


	#if [[ $(basename $i) =~ "narrowPeak" ]]
        #then
                # t="bigNarrowPeak"
		# t="bigBed 12"
#	fi

	if [[ $t =~ "unknown" ]]
	then
		continue
	fi
	# echo $i; 
	n=$(basename $(echo $i | sed -e 's/\./\_/g' -e 's/\-/_/g')); 
	echo "track "$n; 
	bd="https://genedev.bionet.nsc.ru/ftp/by_Project/DAX1/U87/"$(basename $i); 
	echo "bigDataUrl" $bd;
        echo "shortLabel" $n
	echo "longLabel" $n
        echo "type "$t
	echo "visibility full"
	echo "autoScale on"
	echo 
	echo
done
