BIMSBbioinfo / pigx_bsseq

bisulfite sequencing pipeline from fastq to methylation reports
https://bioinformatics.mdc-berlin.de/pigx/
GNU General Public License v3.0
11 stars 4 forks source link

diffmeth.rmd should be passed hyper/hypo files explicitly #123

Closed Blosberg closed 6 years ago

Blosberg commented 6 years ago

at the moment, the diffmeth report generation relies on hard-coded lines that presume the names given explicitly in snakemake. This creates problems if the naming changes: for example, when I had to change "sorted" to "deduped" in the SM file, this whole section broke, until I realized that "sorted" was hard-coded into the file name like this:

diffmeth.Rmd.in:methylDiff_file        <- paste0(outputdir, treatmentpair,'.sorted_diffmeth.RDS')
diffmeth.Rmd.in:methylDiff_hyper_file  <- paste0(outputdir, treatmentpair,'.sorted_diffmethhyper.RDS')
diffmeth.Rmd.in:methylDiff_hypo_file   <- paste0(outputdir, treatmentpair,'.sorted_diffmethhypo.RDS')
diffmeth.Rmd.in:methylDiff_nonsig_file <- paste0(outputdir, treatmentpair,'.sorted_diffmethnonsig.RDS')
diffmeth.Rmd.in:methylDiffBed          <- paste0(outputdir, treatmentpair,'.sorted_diffmeth.bed')

we should pass these files explicitly through params

Blosberg commented 6 years ago

e.g. here: https://github.com/BIMSBbioinfo/pigx_bsseq/blob/138749426e7f49d63b852a585086158443d140a3/report_templates/diffmeth.Rmd.in#L106

this construction makes things very sensitive to changes in the driver/snake-make script and will break easily. For robustness, the full file path to the .rds should be provided explicitly in params. I don't have time to do this now.

Blosberg commented 6 years ago

Fixed with this commit: https://github.com/BIMSBbioinfo/pigx_bsseq/commit/bd2da6b1a87ebf7704dde0f51978e0c1edc48e68