public boolean emptyID() { return ! hasID(); }
public boolean emptyID() { return ! hasID(); }
public boolean emptyID() { return ! hasID(); }
public void validateRSIDs(Set<String> rsIDs) { if ( rsIDs != null && hasID() ) { for ( String id : getID().split(VCFConstants.ID_FIELD_SEPARATOR) ) { if ( id.startsWith("rs") && !rsIDs.contains(id) ) throw new TribbleException.InternalCodecException(String.format("the rsID %s for the record at position %s:%d is not in dbSNP", id, getContig(), getStart())); } } }
public void validateRSIDs(Set<String> rsIDs) { if ( rsIDs != null && hasID() ) { for ( String id : getID().split(VCFConstants.ID_FIELD_SEPARATOR) ) { if ( id.startsWith("rs") && !rsIDs.contains(id) ) throw new TribbleException.InternalCodecException(String.format("the rsID %s for the record at position %s:%d is not in dbSNP", id, getChr(), getStart())); } } }
public void validateRSIDs(Set<String> rsIDs) { if ( rsIDs != null && hasID() ) { for ( String id : getID().split(VCFConstants.ID_FIELD_SEPARATOR) ) { if ( id.startsWith("rs") && !rsIDs.contains(id) ) throw new TribbleException.InternalCodecException(String.format("the rsID %s for the record at position %s:%d is not in dbSNP", id, getContig(), getStart())); } } }
private static String getID(VariantContext v) { if ( v.hasID() ) { return v.getID(); } else { return String.format("Var-%s-%d",v.getChr(),v.getStart()); } }
public enum GenotypeAssignmentMethod { /** * set all of the genotype GT values to NO_CALL */ SET_TO_NO_CALL, /** * set all of the genotype GT values to NO_CALL and remove annotations */ SET_TO_NO_CALL_NO_ANNOTATIONS, /** * Use the subsetted PLs to greedily assigned genotypes */ USE_PLS_TO_ASSIGN, /** * Try to match the original GT calls, if at all possible * * Suppose I have 3 alleles: A/B/C and the following samples: * * original_GT best_match to A/B best_match to A/C * S1 => A/A A/A A/A * S2 => A/B A/B A/A * S3 => B/B B/B A/A * S4 => B/C A/B A/C * S5 => C/C A/A C/C * * Basically, all alleles not in the subset map to ref. It means that het-alt genotypes
if ( expressionVC.hasID() ) infoAnnotations.put(expression.fullName, expressionVC.getID()); } else if (expression.fieldName.equals("ALT")) {
/** * Update rsID of vcToAnnotate with rsID match found in vcsAtLoc, if one exists * * @param vcsAtLoc a list of variant contexts starting at this location to use as sources for rsID values * @param vcToAnnotate a variant context to annotate * @return a VariantContext (may be == to vcToAnnotate) with updated rsID value */ public VariantContext annotateRsID(final List<VariantContext> vcsAtLoc, final VariantContext vcToAnnotate ) { final String rsID = getRsID(vcsAtLoc, vcToAnnotate); // add the ID if appropriate if ( rsID != null ) { final VariantContextBuilder vcb = new VariantContextBuilder(vcToAnnotate); if ( ! vcToAnnotate.hasID() ) { return vcb.id(rsID).make(); } else if ( ! vcToAnnotate.getID().contains(rsID) ) { return vcb.id(vcToAnnotate.getID() + VCFConstants.ID_FIELD_SEPARATOR + rsID).make(); } // falling through to return VC lower down } // nothing to do, just return vc return vcToAnnotate; }
if ( vc.hasID() ) rsIDs.add(vc.getID());
double quality = vc.getPhredScaledQual(); boolean hasId = vc.hasID(); String[] ids = vc.getID().split(",");