Skip to content

Issue with structure_plot when subsampling and all samples from a group are removed #61

@eweine

Description

@eweine

There appears to be an issue in structure_plot when the n argument is less than the total number of rows of L, and some of the groups that are supplied in the grouping argument have a very small number of samples.

The issue typically occurs here: https://github.com/stephenslab/fastTopics/blob/master/R/structure_plot.R#L256

On line 256, if the length of i is 0, the variable y will not have been created, and this will result in the error

Error in structure_plot(...) : 
  object 'y' not found

I think there are two ways to fix this. Either a) do some sort of "smart" sampling, where you make sure to at least sample 1 row from each group or b) keep the sampling the same but somehow work around this issue.

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