Closed eggrandio closed 2 years ago
Hi @eggrandio,
In the case of BiomartGeneRegionTrack
you need to convert it to GeneRegionTrack
to use the modified symbols:
gene_track <- as(gene_track, "GeneRegionTrack")
symbol(gene_track) <- "BOH2"
plotTracks(gene_track, transcriptAnnotation = "symbol")
The coloring issue I could not reproduce I got it correctly colored in black.
gene_track2 <- BiomartGeneRegionTrack(genome = "TAIR10", chromosome = "chr4",
transcriptAnnotation = "symbol",
shape = "arrow",
filters=list(ensembl_transcript_id="AT4G16780.1"),
name = "Gene", biomart = ensembl,
col.line = NULL, col= NULL,
fill = "black", fontcolor.group= "black",
utr3="black",utr5="black",protein_coding="black",
cex.group = 1,
fontface.group = 4)
plotTracks(gene_track2)
Thanks for the quick reply! I was able to rename the gene.
I don't know what could be happening with the coloring. I have the same issue with several genes. I will use the collapseTranscripts
option for now.
Interesting, I do not set collapseTranscripts
and still get the black filled polygons.
No feedback, closing.
Hello,
I am generating some gene tracks programmatically, and I want to modify some of the parameters from a track generated by BiomartGeneRegionTrack. Specifically, I would like to modify the color and the annotation for one Arabidopsis gene, because Biomart returns a long name for the gene symbol, "BETA-OHASE2". I would like to change it to "BOH2" if possible.
This generates the track with this as symbol:
When I plot this track I get the long annotation:
When I try to change the "symbol" on
gene_track
by:When I plot it, I still get the old long annotation, even though the "symbol" of
gene_track
has been successfully changed. It is interesting that the plot only takes the space for "BOH2", but the long name is still plotted:I don't know where is this long annotation stored on the BiomartGeneRegionTrack object. Any ideas?
Also, the second issue, although less important is that when I try to change the BiomartGeneRegionTrack colors, sometimes not all of them are changed. I have to resort to
collapseTranscripts = "meta"
to make them show black:plotTracks(gene_track,utr3="black",utr5="black",protein_coding="black")
But for another gene, it only works partially:
plotTracks(gene_track2)
plotTracks(gene_track2,utr3="black",utr5="black",protein_coding="black")
Even when this gene only has utr5 utr3 and protein_coding features: