However, later in the script, it filters colours.df to create the colours and then ordered_colours df.
## Create a colours vector
# Select only the pops that are in the data
colours <- filter(colours.df, collection %in% unique(pca.scores$pop))
# Put into alphabetic order by collection (the plotting order, and legend order)
colours <- colours[order(colours$collection), ]
Because this isn't created in the if/else above when colours.file = NULL, the script bails. Should be easy to patch, but won't address it at the moment.
Issue is in
pca_from_genind.r
,colour_file = NULL
. If is.null(colour_file), it creates a pallette.However, later in the script, it filters colours.df to create the
colours
and thenordered_colours
df.Because this isn't created in the if/else above when colours.file = NULL, the script bails. Should be easy to patch, but won't address it at the moment.