# Run CBS paired segmentation with pooled normal samples
cbs <- CbsModel(cesN, cesN1.ref)
fit(cbs, verbose=verbose)
print(cbs)
# Export CBS regions
pathname <- writeRegions(cbs, verbose=verbose)
20170831 06:57:51| Pathname: cbsData/gdsc_all,ACC,ra,-XY,BPN,-XY,AVG,A+B,FLN,-XY,paired/GenomeWideSNP_6/YKG-1,chr25,6c653767ed90d29ad5254a760d8f3952.xdr
20170831 06:57:51| Already done. Skipping.
20170831 06:57:51|Array #1018 ('YKG-1') of 1019 on chromosome 25...done
20170831 07:01:07|Genomic-signal tags:
20170831 07:01:07|Reference tags: 6c653767ed90d29ad5254a760d8f3952
20170831 07:01:08|Array #1019 ('YMB-1-E') of 1019 on chromosome 1...
20170831 07:01:08| Pathname: cbsData/gdsc_all,ACC,ra,-XY,BPN,-XY,AVG,A+B,FLN,-XY,paired/GenomeWideSNP_6/YMB-1-E,chr01,6c653767ed90d29ad5254a760d8f3952.xdr
20170831 07:01:08| Already done. Skipping.
Error: empty (zero-byte) input file
Execution halted
# - Setup configurations
# options(mc.cores = 10)
print(future::availableCores())
# Multithreaded
future::plan('multiprocess')
# Increase ram
setOption(aromaSettings, 'memory/ram', 600.0)
# Logs
log <- verbose <- Arguments$getVerbose(-4, timestamp=TRUE)
# Reduce decimal places to minimize space
options(digits=4)
does the error occur when you run:
fit(cbs, verbose=verbose)
or did that complete successfully and you get the error while running:
pathname <- writeRegions(cbs, verbose=verbose)
If you run interactively, what does traceback() output if called
immediately after the error occurs?
Also, see if
fit(cbs, arrays = 1019:1020, chromosomes = c(1, 25), verbose = verbose)
or alternatively,
pathname <- writeRegions(cbs, arrays = 1019:1020, chromosomes = c(1,
25), verbose=verbose)
gives the same error.
fit(cbs, arrays=1019:1020, chromosomes=c(1, 25), verbose=verbose)
# Run CBS paired segmentation with pooled normal samples
cbs <- CbsModel(cesN, cesN1.ref)
out <- tryCatch(
{
fit(cbs, arrays=1019:1020, chromosomes=c(1, 25), verbose=verbose)
},
error=function() {
message('Try/catch: error')
traceback()
},
warning=function() {
message('Try/catch: warning')
traceback()
},
finally={
message('Try/catch: finally')
traceback()
}
)
print(cbs)
pathname <- writeRegions(cbs, verbose=verbose)
> # Export CBS regions
> pathname <- writeRegions(cbs, verbose=verbose)
20170831 21:53:10|Array #1 ('201T') of 1019...
20170831 21:53:10| Extracting regions from all fits...
20170831 21:53:10| Obtaining CN model fits (or fit if missing)...
20170831 21:57:15| Obtaining CN model fits (or fit if missing)...done
20170831 21:57:15| Extracting regions for chromosome #1...
20170831 21:57:15| Extracting regions for chromosome #1...done
20170831 21:57:15| Extracting regions for chromosome #2...
20170831 21:57:15| Extracting regions for chromosome #2...done
20170831 21:57:15| Extracting regions for chromosome #3...
20170831 21:57:15| Extracting regions for chromosome #3...done
Hmm... assuming you're on a *nix-like system, see if there are any
empty (zero-size) RDS files is:
ls -la cbsData/gdsc_all,ACC,ra,-XY,BPN,-XY,AVG,A+B,FLN,-XY,paired/GenomeWideSNP_6/*.rds
The original error message suggests that there could exist such a file.
Also, you wrote "it systematically crashes on the last sample"; did
you run it multiple times and exact same error occurred at the exact
same place?
BTW, your mentioning 1020 samples, but the output says 1019 - probably
not important but better to make sure we're on the same page.
The reason why I'm asking these questions, is to rule out
certain parts of the code. But, a traceback() would be the absolutely
most helpful information.