Search
Question: Error in summarizeOverlaps: Error in names(res) <- nms; 'names' attribute [15] must be the same length as the vector [2]
0
gravatar for chriad
14 months ago by
chriad0
chriad0 wrote:

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)

 

 

ADD COMMENTlink modified 14 months ago • written 14 months ago by chriad0

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 REPLYlink written 14 months ago by Valerie Obenchain ♦♦ 6.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 179 users visited in the last hour