Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highlight specific exon with different color #479

Open
ssssyq1123 opened this issue Jun 19, 2024 · 1 comment
Open

highlight specific exon with different color #479

ssssyq1123 opened this issue Jun 19, 2024 · 1 comment

Comments

@ssssyq1123
Copy link

ssssyq1123 commented Jun 19, 2024

hi, I want to draw a gene track using bed12 using bed display stacked, however, it only allow to set UTR region color, can I highlight some exons in the track also? how could I modified my data in bed12.

@lldelisle
Copy link
Collaborator

Hi,
Indeed we only allow different colors for CDS (coding) and UTR (non-coding). If you want to highighlight some exons, you can modify your bed12 so that the exons you want to highlight are the CDS and all the rest are non coding.
In a bed12 the CDS id defined in columns 7 and 8 see UCSC FAQ.
So if you modify the columns 7 and 8 you can get the resired output:

  • Set all columns 7 and 8 to the same value as column 2.
  • Change columns 7 and 8 for the intervals with exons you want to highlight with the coordinates of the exon.
    For example:
cat original.bed12 | awk -v OFS="\t" '{if ($4=="the name of your gene"){$7=start of highlight exon;$8=end of highlight exon}else{$7=$2;$8=$2};print}' > modified.bed12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants