> For the complete documentation index, see [llms.txt](https://gitbook.bergelsonlab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.bergelsonlab.com/data-pipeline/personal-information-guidelines/addscrubtier.md).

# addscrubtier

## addscrubtier

This script automates the process of adding \*SCR tiers into clan files.

Github repo: [here](https://github.com/SeedlingsBabylab/addscrubtier)

It looks for "begin personal info" and "end personal info" comments and figures out the time interval based on those. It will add the \*SCR tier right after the "begin personal info" comment. Its timestamp will be the interval between personal info comments

For example:

```
*MAN:   &=w0 . 7109230_7111100
%xcom:  begin personal information: church
*SCR:   Scrub 7111100_7149210
%xdb:   average_dB="-24.41" peak_dB="-16.85"
*OLN:   0 . 7111100_7147680
%xdb:   average_dB="-22.16" peak_dB="-9.47"
@Eg:    Pause 268
@Bg:    Conversation 268
*MAN:   &=w10_86 . 7147680_7149210
%xcom:  end personal information
```

### usage

**addscrub.py**

```
1 $: python addscrub.py [original_filename] [output_filename]
```

**batchscrub.py**

```
1 $: python batchscrub.py [start_directory] [subject] [visit]
```

\[subject] and \[visit] can be "all", or a number.

For example:

```
1 $: python batchscrub.py /path/to/Subject_Files all 12
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.bergelsonlab.com/data-pipeline/personal-information-guidelines/addscrubtier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
