Merged bug fix from Stable into Unstable
This commit is contained in:
commit
2d5bbecd9e
|
|
@ -484,6 +484,9 @@ public class UnifiedGenotyperEngine {
|
||||||
|
|
||||||
Map<String, AlignmentContext> stratifiedContexts = null;
|
Map<String, AlignmentContext> stratifiedContexts = null;
|
||||||
|
|
||||||
|
if ( !BaseUtils.isRegularBase( refContext.getBase() ) )
|
||||||
|
return null;
|
||||||
|
|
||||||
if ( model == GenotypeLikelihoodsCalculationModel.Model.INDEL ) {
|
if ( model == GenotypeLikelihoodsCalculationModel.Model.INDEL ) {
|
||||||
|
|
||||||
if (UAC.GenotypingMode == GenotypeLikelihoodsCalculationModel.GENOTYPING_MODE.GENOTYPE_GIVEN_ALLELES) {
|
if (UAC.GenotypingMode == GenotypeLikelihoodsCalculationModel.GENOTYPING_MODE.GENOTYPE_GIVEN_ALLELES) {
|
||||||
|
|
@ -498,6 +501,7 @@ public class UnifiedGenotyperEngine {
|
||||||
stratifiedContexts = AlignmentContextUtils.splitContextBySampleName(pileup, UAC.ASSUME_SINGLE_SAMPLE);
|
stratifiedContexts = AlignmentContextUtils.splitContextBySampleName(pileup, UAC.ASSUME_SINGLE_SAMPLE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// todo - tmp will get rid of extended events so this wont be needed
|
// todo - tmp will get rid of extended events so this wont be needed
|
||||||
if (!rawContext.hasExtendedEventPileup())
|
if (!rawContext.hasExtendedEventPileup())
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -515,9 +519,6 @@ public class UnifiedGenotyperEngine {
|
||||||
}
|
}
|
||||||
} else if ( model == GenotypeLikelihoodsCalculationModel.Model.SNP ) {
|
} else if ( model == GenotypeLikelihoodsCalculationModel.Model.SNP ) {
|
||||||
|
|
||||||
if ( !BaseUtils.isRegularBase( refContext.getBase() ) )
|
|
||||||
return null;
|
|
||||||
|
|
||||||
// stratify the AlignmentContext and cut by sample
|
// stratify the AlignmentContext and cut by sample
|
||||||
stratifiedContexts = AlignmentContextUtils.splitContextBySampleName(rawContext.getBasePileup(), UAC.ASSUME_SINGLE_SAMPLE);
|
stratifiedContexts = AlignmentContextUtils.splitContextBySampleName(rawContext.getBasePileup(), UAC.ASSUME_SINGLE_SAMPLE);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,11 @@ public class NWaySAMFileWriter implements SAMFileWriter {
|
||||||
|
|
||||||
public void addAlignment(SAMRecord samRecord) {
|
public void addAlignment(SAMRecord samRecord) {
|
||||||
final SAMReaderID id = toolkit.getReaderIDForRead(samRecord);
|
final SAMReaderID id = toolkit.getReaderIDForRead(samRecord);
|
||||||
|
String rg = samRecord.getStringAttribute("RG");
|
||||||
|
if ( rg != null ) {
|
||||||
|
String rg_orig = toolkit.getReadsDataSource().getOriginalReadGroupId(rg);
|
||||||
|
samRecord.setAttribute("RG",rg_orig);
|
||||||
|
}
|
||||||
writerMap.get(id).addAlignment(samRecord);
|
writerMap.get(id).addAlignment(samRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue