Closed eolaniru closed 5 months ago
Hi,
Thanks for the issue. I have updated the function. It should now throw an error if it can't find BAI files in the same directory.
Brilliant! Thank you
if(!file.exists(paste0(x , ".bai"))){ stop("Index file for ", x, " not found!") }
This looks for file.bam.bai as index, since x is file.bam. It will not find file.bai. Would it be possible for check for either file extension? Thank you
This should work
if(!file.exists(paste0(sub("\\.bam$", "", x), ".bai")) && !file.exists(paste0(x, ".bai"))){
stop("Index file for ", x, " not found!")
}
Hi,
Thanks again. I have updated the function, it should check for both now.
8f6e4f7
Brilliant! Thank you
issue With the sampleSwaps() function, if no index bai file is provided, it crashes r session without any useful error message. It will be useful to raise an error that bai index files should be provided. Thank you