More complete fix to previous commit
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4571 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
67a776d53c
commit
071799453c
|
|
@ -671,7 +671,9 @@ public class VariantEvalWalker extends RodWalker<Integer, Integer> {
|
||||||
|
|
||||||
VariantContext vc = contexts.size() == 1 ? contexts.iterator().next() : null;
|
VariantContext vc = contexts.size() == 1 ? contexts.iterator().next() : null;
|
||||||
|
|
||||||
if ( vc != null && SAMPLES_LIST.size() > 0 && vc.hasGenotypes(SAMPLES_LIST) ) {
|
if ( SAMPLES_LIST.size() > 0 && vc != null ) {
|
||||||
|
boolean hasGenotypes = vc.hasGenotypes(SAMPLES_LIST);
|
||||||
|
if ( hasGenotypes ) {
|
||||||
//if ( ! name.equals("eval") ) logger.info(String.format("subsetting VC %s", vc));
|
//if ( ! name.equals("eval") ) logger.info(String.format("subsetting VC %s", vc));
|
||||||
vc = vc.subContextFromGenotypes(vc.getGenotypes(SAMPLES_LIST).values());
|
vc = vc.subContextFromGenotypes(vc.getGenotypes(SAMPLES_LIST).values());
|
||||||
HashMap<String,Object> newAts = new HashMap<String,Object>(vc.getAttributes());
|
HashMap<String,Object> newAts = new HashMap<String,Object>(vc.getAttributes());
|
||||||
|
|
@ -679,9 +681,10 @@ public class VariantEvalWalker extends RodWalker<Integer, Integer> {
|
||||||
vc = VariantContext.modifyAttributes(vc,newAts);
|
vc = VariantContext.modifyAttributes(vc,newAts);
|
||||||
logger.debug(String.format("VC %s subset to %s AC%n",vc.getName(),vc.getAttributeAsString(VCFConstants.ALLELE_COUNT_KEY)));
|
logger.debug(String.format("VC %s subset to %s AC%n",vc.getName(),vc.getAttributeAsString(VCFConstants.ALLELE_COUNT_KEY)));
|
||||||
//if ( ! name.equals("eval") ) logger.info(String.format(" => VC %s", vc));
|
//if ( ! name.equals("eval") ) logger.info(String.format(" => VC %s", vc));
|
||||||
} else if ( vc != null && ! vc.hasGenotypes(SAMPLES_LIST) && !name.equals("dbsnp") ) {
|
} else if ( !hasGenotypes && !name.equals("dbsnp") ) {
|
||||||
throw new UserException(String.format("Genotypes for the variant context %s do not contain all the provided samples %s",vc.getName(), getMissingSamples(SAMPLES_LIST,vc)));
|
throw new UserException(String.format("Genotypes for the variant context %s do not contain all the provided samples %s",vc.getName(), getMissingSamples(SAMPLES_LIST,vc)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
map.put(name, allowExcludes && excludeComp(vc) ? null : vc);
|
map.put(name, allowExcludes && excludeComp(vc) ? null : vc);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue