Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Jan 13, 2025
2 parents cd19dc0 + b3d7d40 commit 5c8d4f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions simba/third_party_label_appenders/boris_source_cleaner.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import os
from typing import Union, List, Dict
from typing import Dict, List, Union

import pandas as pd

from simba.utils.checks import check_if_dir_exists, check_that_column_exist
from simba.utils.printing import stdout_success, stdout_warning
from simba.utils.read_write import (find_files_of_filetypes_in_directory, get_fn_ext, write_df)
from simba.utils.read_write import (find_files_of_filetypes_in_directory,
get_fn_ext, write_df)

"""
INSTRUCTIONS:
1. Below, on line 23, change the DATA_DIR to the directory where you have your BORIS annotation files.
2. Below, on line 29, change the SAVE_DIR to the directory where you want to save your new fixed BORIS files.
3. If the names of the subjects or behavior columns in the BORIS CSV changes, change these two names to the names of the columns in SETTINGS (see step 4 as an example)
1. Below, on line 22, change the DATA_DIR to the directory where you have your BORIS annotation files.
2. Below, on line 23, change the SAVE_DIR to the directory where you want to save your new, fixed, BORIS files.
3. If the names of the `Subject` or `Behavior` columns in the BORIS CSV changes, change these two names to the names of the columns in SETTINGS (see step 4 as an example)
4. The SETTINGS specifies the example two rules, (i) for every row in the BORIS files where the subject is focal and the behavior is invest_no, change the behavior name to focal_invest_no, and (ii) for every row where the subject is stimulus and the behavior is invest_no, change the behavior name to stimulus_invest_no. Change these rules or add more if you have more behaviors or animals.
5. Save this file.
6. Activate the SimBA conda environment and navigate to the directory where the boris_source_cleaner.py is located.
7. Run the script by by typing `python boris_source_cleaner.py`
8.
"""

DATA_DIR = r"/Users/simon/Downloads/boris_data" # Directory with BORIS annotations in CSV format.
Expand Down

0 comments on commit 5c8d4f5

Please sign in to comment.