neurogenomics / EpiCompare

Comparison, benchmarking & QC of epigenetic datasets
https://doi.org/doi:10.18129/B9.bioc.EpiCompare
13 stars 3 forks source link

Shorten code by setting names while making list #69

Closed bschilder closed 2 years ago

bschilder commented 2 years ago

Before

# prepare input data
peaks <- list(CnR_H3K27ac, CnT_H3K27ac) # create list of peakfiles
names(peaks) <- c("CnR", "CnT") # set names
picard <- list(CnR_H3K27ac_picard, CnT_H3K27ac_picard) # create list of picard outputs
names(picard) <- c("CnR", "CnT") # set names 

After

#### prepare input data ####
# create list of peakfiles 
peaks <- list(CnR=CnR_H3K27ac, CnT=CnT_H3K27ac) 
# create list of picard outputs
picard <- list(CnR=CnR_H3K27ac_picard, CnT=CnT_H3K27ac_picard)