Hello, I am trying to make a custom greyList using the greyListChIP package and I having some issue generating a consistent grey list. Every time I newly run the script below (even after closing R and start anew), different grey lists for the same input file are generate every time (see below code). Why is that? How do I fix the issue?
library(BiocParallel)
library(GreyListChIP)
register(SerialParam())
#create a Greylist for each INPUT
fn <- file.path('pathToChromosomeLenghtFile/chrNameLength.txt")
gl <- new("GreyList",karyoFile=fn)
gl <- countReads(gl,"pathToInputBamFile/Sample1_dup_sorted.filter.bam")
gl <- calcThreshold(gl,reps=10,sampleSize=1000,p=0.99,cores=1)
gl <- makeGreyList(gl,maxGap=10000)
gl
sessionInfo( )
R version 4.3.3 (2024-02-29)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.5
1st run: gl coverage: 4566073 bp (1.06%) 2nd run after restarting R: gl coverage: 4700729 bp (1.09%) 3rd run after restarting and without running register(SerialParam()): gl coverage: 3622458 bp (0.84%)