janattig / SudokuPlantDesign.jl

Julia package for optimizing Sudoku-like field designs in plant breeding.
5 stars 0 forks source link

Create option to show specific columns on the final Sudoku design labels #2

Open sonalicat opened 1 year ago

sonalicat commented 1 year ago

In the current version, the columns that appear on the label are automatized. But, we need to have the option to choose the particular columns from the data frame to show on the "final_Sudoku_design_labels".

janattig commented 1 year ago

Hi, thanks for raising the issue. Could you maybe give a brief code snippet to explain in more detail, where exactly you need this functionality? If it is about which labels are selected within fill_labels! function to fill the LabeledCheckConfiguration labels, I also would suggest to try and format the passed dataframe in advance (before giving it to the fill_labels! function) - this can be done directly in Julia and no external formating of any file is needed.

sonalicat commented 1 year ago

Hi, thank you for your reply. The target is to show some specific columns (e.g. genotype, system_code, etc) in the "finaldeisgn label" but in the "final_design_excel" file, I want to have all the columns that I have in the main data frame. By formatting the data frame in advance, I am missing some columns in the final Excel output. In the code below, omit_labels helps to remove the column indices that are not necessary for the final labels. But, instead of indices, an option where column names directly could be inserted would be more feasible so that we don't have to check which column belongs to which numbers. And if that's not possible, show_labels would also be helpful instead of omit_labels.

show_configuration(lconf, check_labels=true, show_coordinates=true, text_zoom=0.8, omit_labels=[2,3,5,6,7])