Error in summarizeOverlaps: Error in names(res) <- nms; 'names' attribute [15] must be the same length as the vector [2]
0
1
Entering edit mode
chriad ▴ 10
@chriad-10721
Last seen 7.1 years ago

Edit: One of my bam files has size 0 on disk!

I get the following error when I call summarizeOverlpas:

 

Error in names(res) <- nms :
  'names' attribute [15] must be the same length as the vector [2]
Calls: summarizeOverlaps ... .dispatchBamFiles -> bplapply -> bplapply -> bplapply -> bplapply
In addition: Warning message:
stop worker failed:
  'clear_cluster' receive data failed:
  reached elapsed time limit
Execution halted
Warning messages:
1: In doTryCatch(return(expr), name, parentenv, handler) :
  [bam_header_read] EOF marker is absent. The input is probably truncated.
2: In doTryCatch(return(expr), name, parentenv, handler) :
  [bam_header_read] invalid BAM binary header (this is not a BAM file).
... >Error in serialize(data, node
$con, xdr = FALSE) : ignoring SIGPIPE signal
Calls: bpstart ... .send_VALUE -> <Anonymous> -> sendData.SOCK0node -> serialize
Error in serialize(data, node$con) : ignoring SIGPIPE signal
Calls: local ... .send_VALUE -> <Anonymous> -> sendData.SOCKnode -> serialize
Execution halted

 

The code that I use is the following:

 

library(Rsamtools)
library(GenomicAlignments)
library(TxDb.Celegans.UCSC.ce10.ensGene)
library(BSgenome.Celegans.UCSC.ce10)

# read in paths of bam files
tt <- read.csv(file.path(getwd(),'data', 'samplesBam.txt'), header = T, sep='\t')
bfl <- BamFileList(as.character(tt$FileName), yieldSize=1e6)

names(bfl) <- tt$SampleName

query <- genes(TxDb.Celegans.UCSC.ce10.ensGene,
               filter=list("tx_chrom" = seqnames(BSgenome.Celegans.UCSC.ce10)[1:6]))

library(BiocParallel)
multicoreParam  <-  SnowParam(workers = 8)
register(multicoreParam)
bpisup()
bpstart()
registered()

so <- summarizeOverlaps(features = query,
                        reads = bfl,
                        ignore.strand = F,
                        singleEnd = T,
                        count.mapped.reads=T)

 

 

software error summarizeoverlaps biocParallel • 2.3k views
ADD COMMENT
0
Entering edit mode

I see your edit of 'bam file has size 0 on disk' - sorry, I can't help with that.

If you have legitimate bam files to process, make sure your packages are up to date with biocValid() and edit your question to include the output of sessionInfo().

Valerie

ADD REPLY

Login before adding your answer.

Traffic: 803 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6