Skip to content

Heatmap columns should be ordered as they are in the input csv #10

@cnobles

Description

@cnobles

Whenever the 'patient' column is read from the samples.csv, they are changed to a factor. This is fine, but the factor levels are reordered according to the contents of the column, sorted or what not. We should relabel the factor levels to order that the samples were input. Example below:

test <- c("pHIVP12_d0", "pHIVP12_d7", "pHIVP12_d14", "pHIVP12_d21", "pHIVP12_d28")
factor(test)
[1] pHIVP12_d0 pHIVP12_d7 pHIVP12_d14 pHIVP12_d21 pHIVP12_d28
Levels: pHIVP12_d0 pHIVP12_d14 pHIVP12_d21 pHIVP12_d28 pHIVP12_d7
unique(test)
[1] "pHIVP12_d0" "pHIVP12_d7" "pHIVP12_d14" "pHIVP12_d21" "pHIVP12_d28"
factor(test, levels=unique(test))
[1] pHIVP12_d0 pHIVP12_d7 pHIVP12_d14 pHIVP12_d21 pHIVP12_d28
Levels: pHIVP12_d0 pHIVP12_d7 pHIVP12_d14 pHIVP12_d21 pHIVP12_d28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions