Remove potentially identifying information from header of an SRR *ASC file. Write the new file to the current working directory. This is a superficial method of de-identification or anonymization, but it should do for most cases.

ascAnon(file, newName = NULL)

Arguments

file

Path to SRR *ASC file.

newName

Name to use for newly anonymized *ASC file. If an extension is included it will be ignored and replaced with "asc". If NULL (the default) will use the same name as the source *ASC file, but with "-anon" appended. In either case the same base filename will be used as the name of the *EDF filename in the "CONVERTED FROM" line of the anonynmized *ASC file.

Value

Filename and path to anonymized file.

Details

By default, newly created anonymous *ASC file will will use the same name as the source *ASC file, but with "-anon" appended. In this case, the same base filename will be used as the name of the *EDF filename in the "CONVERTED FROM" line of the anonynmized *ASC file. This is problematic in that, under our usual operating procedures, the filename itself usually consists of an identifier that is uniquely traceable to the participant. In order to make the file truly anonymous, the newName argument must be used.

If newName is provided, that will be used as the basename for the EDF file in the CONVERTED FROM line, as well as the output file name.

NIH guidance on data de-identification can be found here: https://www.hhs.gov/hipaa/for-professionals/privacy/special-topics/de-identification/index.html

Author

Dave Braze <davebraze@gmail.com>

Examples

file <- system.file("extdata/1950168.asc.gz", package="FDBeye")
ascAnon(file)
#> Warning: seek on a gzfile connection returned an internal error
#> [1] "WARNING: Filename may contain potentially identifying information."
#> [1] "         Consider calling this function with a non-NULL 'newName' argument."
#> [1] "./1950168-anon.asc"
ascAnon(file, newName="fred") # TODO: this throws a warning when run on a .gz file. Sort it out.
#> Warning: seek on a gzfile connection returned an internal error
#> [1] "./fred.asc"