Entering edit mode
7.2 years ago
baffiak1902
▴
10
Hello,
I've updated htseq-count into version 0.9.1 (because I've wanted to use function --nonunique all), but it failed with error
Error occured when reading beginning of SAM/BAM file.
'csamtools.AlignedRead' object has no attribute 'reference_start'
[Exception type: AttributeError, raised in _HTSeq.pyx:1357]
and I don't know, how to fix it.
For generating of BAM file, I've used STAR version 2.5.3a_modified with command:
~/STAR_2.5.3a_modified/bin/Linux_x86_64/STAR --genomeDir /mnt/d/Xenopus_9_2 --readFilesIn sortmerna/sort_15_3A_1_sequence.fastq sortmerna/sort_15_3A_2_sequence.fastq --runThreadN 12 --outFileNamePrefix STAR/15_3A/15_3A --outSAMtype BAM SortedByCoordinate
and I'm running htseq-count with command:
htseq-count -f bam -t exon -i ID --additional-attr=gene -r pos -m intersection-nonempty --nonunique all -s no STAR/15_3A/15_3AAligned.sortedByCoord.out.bam /mnt/d/Xenopus_9_2/XENLA_9.2_Xenbase.gff3 > count/15_3A.count
pysam version: 0.11.2.2
Thanks for help.
OK, I found a problem. BAM file generated by STAR doesn't contain correct names of for newer version of samtools. After converting it into SAM and again into BAM, it works correctly.
Hi,
So you updated your STAR version ? and realigned files?
Ron
I had a last version of STAR, but I worked with old version of htseq-count for long time. But newer version of htseq-count works with descriptions in newer version of samtools and STAR use old names for BAM fromat.
So, I've converted BAM file from STAR into SAM file, and SAM file again into BAM. I thnik (I hadn't time to test it), I can generate results from STAR directly into SAM, convert and sort it into BAM, and I can use htseq-count after that.
But I want to write bug report to Alex Dobin.