I changed crunch2bam to the following:
crunch2BAM<-function(sam.files, dir=".")
# This crunches a set of SAM files to sorted & indexed BAM files using the samtools command.
# We avoid calling Rsamtools because of strange errors with 'invalid cross-device link'. I
# think it's putting things in /tmp when that might be full, and I can't see any option to
# change the temporary directory.
#
# written by Aaron Lun
{
out<-NULL
for (sam.file in sam.files) {
prefix<-file.path(dir, sub("\\.sam$", "", basename(sam.file)))
temp<-tempfile(tmpdir=dir, fileext=".bam")
if (system(paste("samtools view -bS -h", sam.file, "-o", temp), ignore.stderr=TRUE)) {
stop("failed to compress to BAM")
}
# system(paste("samtools sort", temp, prefix), ignore.stderr=TRUE)
if (system(paste("samtools sort", temp, "-o", paste0(prefix, ".bam")), ignore.stderr=TRUE)) {
stop("failed to sort BAM file")
}
bam.file<-paste0(prefix, ".bam")
indexBam(bam.file)
unlink(temp)
out<-append(out, bam.file)
}
return(out);
}
and then created a new tar.gz with
tar -cvzf xscss_1.1.2.tar.gz xscss/**
But when I try to install it I get
> install.packages("xscss_1.1.2.tar.gz", repos=NULL, type="source")
Installing package into '/local/home/endrebak/R/x86_64-pc-linux-gnu-library/3.2'
(as 'lib' is unspecified)
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
Warning in file.link(name2, name) :
cannot link 'xscss/man/fillGenome.Rd' to 'xscss/man/fillGenome.Rd', reason 'No such file or directory'
... long list of similar messages ...
* installing *source* package 'xscss' ...
** libs
Warning: no source files found
** help
No man pages found in package 'xscss'
*** installing help indices
** building package indices
** testing if installed package can be loaded
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
Note: the specification for S3 class "AsIs" in package 'DBI' seems equivalent to one from package 'BiocGenerics': not turning on duplicate class definitions for this class.
Error in library.dynam(lib, package, package.lib) :
shared object 'xscss.so' not found
Error: loading failed
Execution halted
ERROR: loading failed
Thank you! If I e-mail you directly, my question and your answer will not be googleable for others. Is asking about the paper on the csaw github an acceptable compromise?
Also, thanks for making the simulations available. For a non-statistician like me, seeing what is produced is much more helpful than reading a description :)
My pleasure. Do the simulations work with the modified
crunch2BAM
? If there's anything else that's broken, I'd like to fix it before uploading a new copy of the package to the WEHI website.Well, I suppose. You know what - it doesn't really matter, this is fine.
I do not get e-mail notifications from support.bioconductor, so I did not see your q. Will find out now and report back to you.
It did not work. I'll try different things to get it to work, but suggestions welcome :)