Skip to content

[Code Refactor]: Config file being referenced is not consistent across rmarkdown files in DNAm QC pipeline #292

Description

@sof202

Path to affected file

array/DNAm/preprocessing/clusterCellTypes.r
array/DNAm/preprocessing/QC.rmd
array/DNAm/preprocessing/normalisation.r
array/DNAm/preprocessing/calcQCMetrics.r
array/DNAm/preprocessing/loadDataGDS.r
array/DNAm/preprocessing/checkColnamesSampleSheet.r
array/DNAm/preprocessing/checkRconfigFile.r

Type of refactor

Code understandability improvement

Description of required code refactor

Currently, the QC pipeline uses the $RCONFIG variable set in the config that is sourced by the bash script. However, all the other scripts here (and rmarkdown files) use a specific file name config.r that must be located in the root of the data folder held by the variable $DATADIR.

This will obviously lead to confusion as you can specify where your R config file is, but if you don't put it in a specific location with a specific name, the pipeline will not run correctly (and will likely break in fantastical ways).

I think that it is always a good idea to allow more flexibility to the user (perhaps they have multiple config files they want to use on the same set of data). As such all of these scripts should take the location of the R config file as an input and source that directly (instead of using set paths).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions