Question: Redundant @Sq Lines In Bam File
0
gravatar for deepthithomaskannan
7.3 years ago by
Canada
deepthithomaskannan300 wrote:

Hi all,

Anybody has the idea why redundant @SQ lines present in bam file header?

I created the bam file by the following procedure:

bowtie-build the genome
create sam file using samtools by aligning fastq files to the bowtie-build output
convert sam to bam using samtools

Those redundant files making error "Cannot add sequence that already exists in SAMSequenceDictionary" while I am trying to add Read Groups using picard-AddOrReplaceReadGroups.

Deeps

picard bowtie • 2.9k views
ADD COMMENTlink modified 6.0 years ago by Giovanni M Dall'Olio26k • written 7.3 years ago by deepthithomaskannan300
3

what you write does not quite makes sense, sam files are not created by samtools, and bowtie-build does not align data. Edit you your post and add the commands that you used and perhaps a sample of what you call redundant @SQ lines

ADD REPLYlink written 7.3 years ago by Istvan Albert ♦♦ 81k
0
gravatar for deepthithomaskannan
7.3 years ago by
Canada
deepthithomaskannan300 wrote:

Hi Albert,

The editor deleted the new lines between the steps. I did not notice that.

The steps are:

  1. Build the bowtie index using bowtie-build for genome.

  2. create sam file using bowtie(not samtools) (by aligning fastq files to the bowtie-build output)

  3. convert sam to bam using samtools

The generated bam files contains duplicate @SQ lines in the header. I think I got the reason . One file used to build the bowtie index is the subset of another file. ChrY.fa is a part of ChrU.fa.

COMMAND: bowtie-build Chr1.fa,Chr2.fa.....ChrY.fa genomeindexbasename

ADD COMMENTlink written 7.3 years ago by deepthithomaskannan300

ok, good thing that you have tracked that down - I think that would have been a bit difficult to troubleshoot for us

ADD REPLYlink written 7.3 years ago by Istvan Albert ♦♦ 81k
Please log in to add an answer.

Help
Access

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