I got .sam files from Bowtie2.
now I want to merge these two files.First ,I run:
samtools view -bSh ERR1.sam >ERR1.bam
samtools view -bSh ERR2.sam >ERR2.bam
and,I got the bam file.(they should have the head)
However,I run the next:
samtools sort ERR1.bam ERR1.sorted.bam (here,I got the sorted file,lucky)
samtools sort ERR2.bam ERR2.sorted.bam
about the ERR2.bam, I didn't get the sorted file, this was the output:
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_sort_core] truncated file. Continue anyway.
Segmentation fault (core dumped)
why?Just because the ERR2.sam is too big(about 66G)?
now I want to merge these two files.First ,I run:
samtools view -bSh ERR1.sam >ERR1.bam
samtools view -bSh ERR2.sam >ERR2.bam
and,I got the bam file.(they should have the head)
However,I run the next:
samtools sort ERR1.bam ERR1.sorted.bam (here,I got the sorted file,lucky)
samtools sort ERR2.bam ERR2.sorted.bam
about the ERR2.bam, I didn't get the sorted file, this was the output:
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_sort_core] truncated file. Continue anyway.
Segmentation fault (core dumped)
why?Just because the ERR2.sam is too big(about 66G)?
Comment