Hi,
I set up a pipeline to process sequence data from FASTQ.gz -> sorted, non-redundant, and indexted BAM files. After the pipeline finishes, I delete the SAM files to conserve space.
In order to add @RG tags to some BAM files, I need to convert the BAM back to SAM and run a script to add the tags. I use samtools at the linux command line; I do not use picard--nor to I want to.
The conversion was performed as follows:
samtools view -h BGL-160-014_TGACCA_R2.fastq.gz.nodup.srt.bam > BGL-160-014_TGACCA_R2.fastq.gz.nodup.srt.sam
The following error occured when after the conversion:
samtools view BGL-160-014_TGACCA_R2.fastq.gz.nodup.srt.sam
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[main_samview] fail to read the header from "BGL-160-014_TGACCA_R2.fastq.gz.nodup.srt.sam".
The same error occurs if I use -H to view the header.
Is there something I'm missing here?
Cheers,
Joe White
I set up a pipeline to process sequence data from FASTQ.gz -> sorted, non-redundant, and indexted BAM files. After the pipeline finishes, I delete the SAM files to conserve space.
In order to add @RG tags to some BAM files, I need to convert the BAM back to SAM and run a script to add the tags. I use samtools at the linux command line; I do not use picard--nor to I want to.
The conversion was performed as follows:
samtools view -h BGL-160-014_TGACCA_R2.fastq.gz.nodup.srt.bam > BGL-160-014_TGACCA_R2.fastq.gz.nodup.srt.sam
The following error occured when after the conversion:
samtools view BGL-160-014_TGACCA_R2.fastq.gz.nodup.srt.sam
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[main_samview] fail to read the header from "BGL-160-014_TGACCA_R2.fastq.gz.nodup.srt.sam".
The same error occurs if I use -H to view the header.
Is there something I'm missing here?
Cheers,
Joe White
Comment