rethomics / damr

Read TriKinetics' DAM data in R
http://rethomics.github.io
6 stars 7 forks source link

non-DAM2 data #42

Closed aroquej closed 1 year ago

aroquej commented 1 year ago

Hi!

I am having some issues when loading my data into behavr tables. I was wondering if it is possible to use Rethomics for non-DAM2 or Ethoscope data analysis (like observational and tracking data).

For example, I analyse the entrance and exit of a bee-hive during 10-minute intervals, and the data is plotted out into CSV files as it follows. col1.csv

I tried to make it look like an .txt file from DAM2, but it still did not work. The error that appears is highlighted in bold. col1.txt

Here is my script:

DATA_DIR <- "C:/Users/Arthur Roque/OneDrive - usp.br/test" setwd(DATA_DIR)

list.files(DATA_DIR, pattern= ".txt|.csv")

"col1.txt" "metadata.csv"

metadata <- fread("metadata.csv") metadata

                            id file_info      start_datetime       stop_datetime

1: 2022-12-10 00:00:00|col1.txt|01 <list[2]> 2022-12-10 00:00:00 2022-12-13 23:50:00 region_id 1: 1

metadata <- link_dam_metadata(metadata, result_dir = DATA_DIR)

dt<- load_dam(metadata) Error in fun(file, col.names = names(DAM5_COLS)[cols_to_keep], select = cols_to_keep) : Column number 8 (select[4]) is too large for this table, which only has 4 columns.

Metadata: metadata.csv

Thank you very much!

qgeissmann commented 1 year ago

Hi @arthurroquejus1 , It looks like an interesting dataset/question.Yes, it is absolutely possible. In fact, in fact several authors haved used rethomics in other contexts. You will need to build your customised behavr tables though and that depends a lot on your data type. The tutorial and documentation for behavr are good starting points. If you find you need more help, perhaps my group could provide a more formal collaboration (e.g. depending on your acquisition tool, we could write a package to read your data type...). Happy holidays, Quentin

aroquej commented 1 year ago

Hi @qgeissmann,

thanks a lot for the answer. I will keep trying to adapt my data to a more appropriate format for behavr tables. I think there is some DAMS' particularities that I am not quite acquainted with. If I find I can not sort it out I will write back.

Best wishes and Happy hollidays, Arthur.