Fixed bug where we weren't setting the reads group correctly. Also added code to set the printMetrics field of the singleSampleGenotyper from the Pool caller, it was null excepting out for me without that set.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@548 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2009-04-27 15:17:20 +00:00
parent 1daf8e0987
commit a343f3eab7
2 changed files with 16 additions and 11 deletions

View File

@ -138,7 +138,10 @@ public class MergingSamRecordIterator2 implements CloseableIterator<SAMRecord>,
if (oldProgramGroupId != null) {
final String newProgramGroupId = this.samHeaderMerger.getProgramGroupId(iterator.getReader(), oldProgramGroupId);
record.setAttribute(SAMTag.PG.toString(), newProgramGroupId);
} else {
}
// if we don't have a read group, set one correctly
if (record.getAttribute(SAMTag.RG.toString()) == null) {
List<SAMReadGroupRecord> readGroups = iterator.getReader().getFileHeader().getReadGroups();
if (readGroups.size() == 1) {
record.setAttribute(SAMTag.RG.toString(), readGroups.get(0).getReadGroupId());

View File

@ -1,21 +1,22 @@
package org.broadinstitute.sting.playground.gatk.walkers;
import net.sf.samtools.*;
import org.broadinstitute.sting.gatk.*;
import org.broadinstitute.sting.gatk.refdata.ReferenceOrderedData;
import org.broadinstitute.sting.gatk.refdata.ReferenceOrderedDatum;
import org.broadinstitute.sting.gatk.refdata.rodDbSNP;
import org.broadinstitute.sting.gatk.refdata.rodGFF;
import net.sf.samtools.SAMFileHeader;
import net.sf.samtools.SAMReadGroupRecord;
import net.sf.samtools.SAMRecord;
import org.broadinstitute.sting.gatk.GenomeAnalysisTK;
import org.broadinstitute.sting.gatk.LocusContext;
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
import org.broadinstitute.sting.gatk.walkers.LocusWalker;
import org.broadinstitute.sting.gatk.LocusContext;
import org.broadinstitute.sting.playground.gatk.walkers.AlleleFrequencyWalker;
import org.broadinstitute.sting.playground.utils.AlleleFrequencyEstimate;
import org.broadinstitute.sting.utils.*;
import org.broadinstitute.sting.utils.GenomeLoc;
import org.broadinstitute.sting.utils.ReadBackedPileup;
import org.broadinstitute.sting.utils.Utils;
import org.broadinstitute.sting.utils.cmdLine.Argument;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class PoolCaller extends LocusWalker<AlleleFrequencyEstimate, String>
{
@ -56,6 +57,7 @@ public class PoolCaller extends LocusWalker<AlleleFrequencyEstimate, String>
caller.metricsFileName = "/dev/null";
caller.lodThreshold = 5.0;
caller.fourBaseMode = false;
caller.printMetrics = false;
caller.initialize();
callers.add(caller);
}