interactivereport / RNASequest

18 stars 3 forks source link

Variable ordering for PC_Covariate analysis and wiki update #6

Closed ferg-0 closed 3 years ago

ferg-0 commented 3 years ago

Currently it looks like the ordering of the sampleMeta table is important as it is preserved in QuickOmics and the group variable (say "Group") has levels that have order defined by factor(Group,levels=unique(Group)) so it the ordering is "preserved" in the QuickOmics expression plots etc. in the input order. This is desirable behavior as the analyst can define a natural order at the start. However the PC Covariate code/plots do not preserve the input order for variables (rather the levels are ordered alphabetically as will happen in default in R). It would be desirable for the PC Covariate code that makes both the static plots and the plots in QuickOmics preserve the input order. e.g. input order here should be Ref, DEX_TAC. DEX_TOF, DEX_TAC_TOF (3 doses) but it ends up alphabetically ordered all this should require is a modification of factor variables factor(var,levels=unique(var)). image

/camhpc/ngs/projects/TST11781/dnanexus/20210607022720_Maria.Zavodszky/EA20210831_0/Liv

xinmin-zhang commented 3 years ago

The Value column in the data.frame for potting has all values from all significant meta data columns. The levels (from factor columns) and unique values (from character columns) are combined as the levels for the data.frame used in plot. This works most of the time, but when two columns have the same value, only the first column will be correctly ordered.