FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

Re: [Seqan-dev] mapQ overwritten when writing sam/bam?

<-- thread -->
<-- date -->
  • From: Bernd Jagla <bernd.jagla@pasteur.fr>
  • To: seqan-dev@lists.fu-berlin.de
  • Date: Wed, 16 May 2012 14:43:35 +0200
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: Re: [Seqan-dev] mapQ overwritten when writing sam/bam?

Hi,
sorry, it seems the problem is on my side...
Thanks for looking into it, though,
Cheers,
Bernd

On 5/16/2012 11:18 AM, Holtgrewe, Manuel wrote:
Hi Bernd,

what do you mean it is changed? Is the wrong value written to the file? Is it changed in the program itself? Are you writing SAM or BAM?

Can you provide a minimal program that shows the problem?

Second, I guess the function signature should be:

template<typename TStream, typename TFormat>
int writeOutRecordSet(TStream&fp, String<BamAlignmentRecord>  const&  recSet,
          BamIOContext<StringSet<CharString>  >  &  context, TFormat const&
tag,
          ROI&  roi) {

- StringSet<BamAlignmentRecord>  &  recSet ->  String<BamAlignmentRecord>  const&  recSet

Cheers!
Manuel
________________________________________
From: Bernd Jagla [bernd.jagla@pasteur.fr]
Sent: Wednesday, May 16, 2012 9:55 AM
To: seqan-dev@lists.fu-berlin.de
Subject: [Seqan-dev] mapQ overwritten when writing sam/bam?

Hi,

I am using the sam/bam packages to read and write sam/bam files and I
noticed that a value for the mapping quality (column 5) has been changed
from 255 to 0...
Is this possible? I am using the BamIOContext as in the following example:

template<typename TStream, typename TFormat>
int writeOutRecordSet(TStream&fp, StringSet<BamAlignmentRecord>  recSet,
          BamIOContext<StringSet<CharString>  >  &  context, TFormat const&
tag,
          ROI&  roi) {

      unsigned maxC = 0;
      for (unsigned i = 0; i<  length(roi.count); i++) {
          if (maxC<  roi.count[i])
              maxC = roi.count[i];
      }
      roi.countMax = maxC;
      for (unsigned i = 0; i<  length(recSet); i++) {
          BamTagsDict tagDict(recSet[i].tags);
          setTagValue(tagDict, "rl", roi.len);
          setTagValue(tagDict, "ri", roi.min);
          setTagValue(tagDict, "rx", roi.max);
          setTagValue(tagDict, "ry", maxC);
          setTagValue(tagDict, "rn", length(recSet), 'i');
          write2(fp, recSet[i], context, tag);
      }
      return maxC;
}

What do I have to do to keep the value?

Thanks a lot for your kind support.

Best,

Bernd


_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev

_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev






<-- thread -->
<-- date -->
  • References:
    • [Seqan-dev] mapQ overwritten when writing sam/bam?
      • From: Bernd Jagla <bernd.jagla@pasteur.fr>
    • Re: [Seqan-dev] mapQ overwritten when writing sam/bam?
      • From: "Holtgrewe, Manuel" <manuel.holtgrewe@fu-berlin.de>
  • seqan-dev - May 2012 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the seqan-dev mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal