Entering edit mode
19 months ago
Chris
▴
340
Hi all, would you please tell me what is wrong in this case? Thank you.
samtools view Library_allAligned.out.bam | head -n 10
[main_samview] fail to read the header from "Library_allAligned.out.bam"
Your BAM file may be missing a header. Do you see anything if you do
samtools view -H Library_allAligned.out.bam
?No. I got the same error.
How did you make the BAM?
I used STAR. This is whole genome data with 2 libraries. I guess the error is because I merge two bam files.
Can you run the
view -H
command on the two original files? Merging should preserve the header unless you tried to merge files aligned to two different genomes.Yes,
view -H
worked on the two original files. I used the same reference genome. Would you please suggest what wrong in this case? I sorted before merging.Can you try?
I am running your command. The first bam file is light but the second is 66 Gb so I took quite a long time to finish. Do you think using batch submit with more CPU makes it finish faster?
merge
command can use multiple threads and will also write out an index.So the command will be something like:
Is that correct?