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

[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 09:55:29 +0200
  • Reply-to: SeqAn Development <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




<-- thread -->
<-- date -->
  • Follow-Ups:
    • 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