Closed drdna closed 2 months ago
I added some suggestions for how you can add color values to the BED file using BASH scripting to the step by step tutorial. Briefly, you can use the following one liner:
awk '{
if ($4 ~ /DR/) print $0 "\t255,255,0"; # Yellow for 'DR' in column 4
else if ($4 ~ /TIR/) print $0 "\t255,165,0"; # Orange for 'TIR' in column 4
else if ($5 ~ /tyr|cap/) print $0 "\t255,0,0"; # Red for 'tyr' or 'cap' in column 5
else if ($5 != ".") print $0 "\t128,0,128"; # Purple if column 5 is not '.'
else print $0 "\t169,169,169"; # Dark gray otherwise
}' test.bed > test_color.bed
I'd like to suggest that color values be automatically added to bed/gff files to distinguish different features (e.g. TYRs, DRs, TIRs, etc.). This will make interpretation in browsers much easier. Perhaps allow overriding through command line options?