Closed royfrancis closed 7 years ago
Ok. Changing the factor level doesn't work. I just tried it out.
QoRTs does actually have a hidden function for this. The qorts plotter object (bpg in your code) has a data frame in it called "lanebam.params" with a column titled "plot.priority". For most plotters, this will all be set to the same value.
So you can access (and edit) this data frame using the commands:
#say you have a list of unique.ID's that you want to highlight, called "myhighlightlist"
#if you want, you can set this to the list of uid's that are in group "small" or "control".
myhighlightlist <- bpg$decoder$unique.ID[ as.character(bpg$decoder$group.ID) != "Large" ]
#view the lanebam.params data frame:
head(bpg$lanebam.params)
#set the priority to 2 for the replicates you want on "top", set it to 1 otherwise.
bpg$lanebam.params[! bpg$unique.ID %in% myhighlightlist] <- 1;
bpg$lanebam.params[bpg$unique.ID %in% myhighlightlist] <- 2;
You can also add even more priorities, QoRTs will plot them in order starting at the smallest and go up.
That works! Thanks :-)
What would be the easiest way to change plotting order?
As see above, the few 'Control' samples and 'Small' samples are hidden behind all the 'Large' samples. I was wondering if I could change the order of levels in the
group.ID
factor for decoder? Would that work? Thanks.