Question: Error reading BAM file with duplicated header in easyRNAseq and GenomicAlignments
gravatar for Michael Dondrup
3.1 years ago by
Bergen, Norway
Michael Dondrup10 wrote:

I am trying to re-count a bunch of bam files that I have previously opened without problems in easyRNAseq and GenomicAlignments. But now I get. The bam files are seemingly valid and can be accessed by samtools, but the header contains few duplicated entries.

reads = readGAlignments('test.fastq.gz.clipped_M.bam.sorted.bam')
Error in GAlignments(seqnames = bamcols$rname, pos = bamcols$pos, cigar = bamcols$cigar,  :
  'seqlengths' must be an integer vector with unique names
In addition: Warning message:
In `levels<-`(`*tmp*`, value = if (nl == nL) as.character(labels) else paste0(labels,  :
  duplicated levels in factors are deprecated


This is a related thread:

Error when reading bam file with duplicated header

ADD COMMENTlink modified 3.1 years ago by Martin Morgan ♦♦ 22k • written 3.1 years ago by Michael Dondrup10
gravatar for Martin Morgan
3.1 years ago by
Martin Morgan ♦♦ 22k
United States
Martin Morgan ♦♦ 22k wrote:

Sorry for the delay, but I believe this is now fixed in GenomicAlignments / Rsamtools 1.4.2 / 1.20.5 (release) and 1.5.18 / 1.21.19 (devel).

ADD COMMENTlink written 3.1 years ago by Martin Morgan ♦♦ 22k

Thank you for fixing it. I can confirm that I can read and count the bam files again using GenomicAlignments and easyRNAseq, feels good :D

ADD REPLYlink written 3.1 years ago by Michael Dondrup10
Please log in to add an answer.


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