Merge branch 'master' of ssh://nickel.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
This commit is contained in:
commit
5f3f46aad1
|
|
@ -96,24 +96,23 @@ public abstract class CommandLineExecutable extends CommandLineProgram {
|
||||||
loadArgumentsIntoObject(walker);
|
loadArgumentsIntoObject(walker);
|
||||||
argumentSources.add(walker);
|
argumentSources.add(walker);
|
||||||
|
|
||||||
Collection<RMDTriplet> newStyle = ListFileUtils.unpackRODBindings(parser.getRodBindings(), parser);
|
Collection<RMDTriplet> rodBindings = ListFileUtils.unpackRODBindings(parser.getRodBindings(), parser);
|
||||||
|
|
||||||
// todo: remove me when the old style system is removed
|
// todo: remove me when the old style system is removed
|
||||||
if ( getArgumentCollection().RODBindings.size() > 0 ) {
|
if ( getArgumentCollection().RODBindings.size() > 0 ) {
|
||||||
logger.warn("################################################################################");
|
logger.warn("################################################################################");
|
||||||
logger.warn("################################################################################");
|
logger.warn("################################################################################");
|
||||||
logger.warn("Deprecated -B rod binding syntax detected. This syntax will be retired in GATK 1.2.");
|
logger.warn("Deprecated -B rod binding syntax detected. This syntax has been eliminated in GATK 1.2.");
|
||||||
logger.warn("Please use arguments defined by each specific walker instead.");
|
logger.warn("Please use arguments defined by each specific walker instead.");
|
||||||
for ( String oldStyleRodBinding : getArgumentCollection().RODBindings ) {
|
for ( String oldStyleRodBinding : getArgumentCollection().RODBindings ) {
|
||||||
logger.warn(" -B rod binding with value " + oldStyleRodBinding + " tags: " + parser.getTags(oldStyleRodBinding).getPositionalTags());
|
logger.warn(" -B rod binding with value " + oldStyleRodBinding + " tags: " + parser.getTags(oldStyleRodBinding).getPositionalTags());
|
||||||
}
|
}
|
||||||
logger.warn("################################################################################");
|
logger.warn("################################################################################");
|
||||||
logger.warn("################################################################################");
|
logger.warn("################################################################################");
|
||||||
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Collection<RMDTriplet> oldStyle = ListFileUtils.unpackRODBindingsOldStyle(getArgumentCollection().RODBindings, parser);
|
engine.setReferenceMetaDataFiles(rodBindings);
|
||||||
oldStyle.addAll(newStyle);
|
|
||||||
engine.setReferenceMetaDataFiles(oldStyle);
|
|
||||||
|
|
||||||
for (ReadFilter filter: filters) {
|
for (ReadFilter filter: filters) {
|
||||||
loadArgumentsIntoObject(filter);
|
loadArgumentsIntoObject(filter);
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,8 @@ public class GATKArgumentCollection {
|
||||||
@Input(fullName = "reference_sequence", shortName = "R", doc = "Reference sequence file", required = false)
|
@Input(fullName = "reference_sequence", shortName = "R", doc = "Reference sequence file", required = false)
|
||||||
public File referenceFile = null;
|
public File referenceFile = null;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
@Hidden
|
||||||
@ElementList(required = false)
|
@ElementList(required = false)
|
||||||
@Input(fullName = "rodBind", shortName = "B", doc = "Bindings for reference-ordered data, in the form :<name>,<type> <file>", required = false)
|
@Input(fullName = "rodBind", shortName = "B", doc = "Bindings for reference-ordered data, in the form :<name>,<type> <file>", required = false)
|
||||||
public ArrayList<String> RODBindings = new ArrayList<String>();
|
public ArrayList<String> RODBindings = new ArrayList<String>();
|
||||||
|
|
@ -340,14 +342,6 @@ public class GATKArgumentCollection {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (other.RODBindings.size() != RODBindings.size()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for (int x = 0; x < RODBindings.size(); x++) {
|
|
||||||
if (!RODBindings.get(x).equals(other.RODBindings.get(x))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!other.samFiles.equals(this.samFiles)) {
|
if (!other.samFiles.equals(this.samFiles)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,14 +88,6 @@ public class GATKArgumentCollectionUnitTest extends BaseTest {
|
||||||
collect.intervals.add("intervals".toLowerCase());
|
collect.intervals.add("intervals".toLowerCase());
|
||||||
collect.excludeIntervals = new ArrayList<String>();
|
collect.excludeIntervals = new ArrayList<String>();
|
||||||
collect.numberOfThreads = 1;
|
collect.numberOfThreads = 1;
|
||||||
|
|
||||||
// make some rod bindings up
|
|
||||||
ArrayList<String> fakeBindings = new ArrayList<String>();
|
|
||||||
fakeBindings.add("Bind1");
|
|
||||||
fakeBindings.add("Bind2");
|
|
||||||
fakeBindings.add("Bind3");
|
|
||||||
|
|
||||||
collect.RODBindings = fakeBindings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue