Revving the Tribble jar where the DbsnpCodec class was renamed to OldDbsnpCodec. Updating GATK code accordingly.
This commit is contained in:
parent
9559115ad5
commit
da9c8ab386
|
|
@ -3,7 +3,7 @@ package org.broadinstitute.sting.gatk.refdata;
|
|||
import net.sf.samtools.util.SequenceUtil;
|
||||
import org.broad.tribble.Feature;
|
||||
import org.broad.tribble.annotation.Strand;
|
||||
import org.broad.tribble.dbsnp.DbSNPFeature;
|
||||
import org.broad.tribble.dbsnp.OldDbSNPFeature;
|
||||
import org.broad.tribble.gelitext.GeliTextFeature;
|
||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||
import org.broadinstitute.sting.utils.classloader.PluginManager;
|
||||
|
|
@ -93,27 +93,27 @@ public class VariantContextAdaptors {
|
|||
// --------------------------------------------------------------------------------------------------------------
|
||||
|
||||
private static class DBSnpAdaptor implements VCAdaptor {
|
||||
private static boolean isSNP(DbSNPFeature feature) {
|
||||
private static boolean isSNP(OldDbSNPFeature feature) {
|
||||
return feature.getVariantType().contains("single") && feature.getLocationType().contains("exact");
|
||||
}
|
||||
|
||||
private static boolean isMNP(DbSNPFeature feature) {
|
||||
private static boolean isMNP(OldDbSNPFeature feature) {
|
||||
return feature.getVariantType().contains("mnp") && feature.getLocationType().contains("range");
|
||||
}
|
||||
|
||||
private static boolean isInsertion(DbSNPFeature feature) {
|
||||
private static boolean isInsertion(OldDbSNPFeature feature) {
|
||||
return feature.getVariantType().contains("insertion");
|
||||
}
|
||||
|
||||
private static boolean isDeletion(DbSNPFeature feature) {
|
||||
private static boolean isDeletion(OldDbSNPFeature feature) {
|
||||
return feature.getVariantType().contains("deletion");
|
||||
}
|
||||
|
||||
private static boolean isIndel(DbSNPFeature feature) {
|
||||
private static boolean isIndel(OldDbSNPFeature feature) {
|
||||
return isInsertion(feature) || isDeletion(feature) || isComplexIndel(feature);
|
||||
}
|
||||
|
||||
public static boolean isComplexIndel(DbSNPFeature feature) {
|
||||
public static boolean isComplexIndel(OldDbSNPFeature feature) {
|
||||
return feature.getVariantType().contains("in-del");
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ public class VariantContextAdaptors {
|
|||
*
|
||||
* @return an alternate allele list
|
||||
*/
|
||||
public static List<String> getAlternateAlleleList(DbSNPFeature feature) {
|
||||
public static List<String> getAlternateAlleleList(OldDbSNPFeature feature) {
|
||||
List<String> ret = new ArrayList<String>();
|
||||
for (String allele : getAlleleList(feature))
|
||||
if (!allele.equals(String.valueOf(feature.getNCBIRefBase()))) ret.add(allele);
|
||||
|
|
@ -139,7 +139,7 @@ public class VariantContextAdaptors {
|
|||
*
|
||||
* @return an alternate allele list
|
||||
*/
|
||||
public static List<String> getAlleleList(DbSNPFeature feature) {
|
||||
public static List<String> getAlleleList(OldDbSNPFeature feature) {
|
||||
List<String> alleleList = new ArrayList<String>();
|
||||
// add ref first
|
||||
if ( feature.getStrand() == Strand.POSITIVE )
|
||||
|
|
@ -156,14 +156,14 @@ public class VariantContextAdaptors {
|
|||
|
||||
/**
|
||||
* Converts non-VCF formatted dbSNP records to VariantContext.
|
||||
* @return DbSNPFeature.
|
||||
* @return OldDbSNPFeature.
|
||||
*/
|
||||
@Override
|
||||
public Class<? extends Feature> getAdaptableFeatureType() { return DbSNPFeature.class; }
|
||||
public Class<? extends Feature> getAdaptableFeatureType() { return OldDbSNPFeature.class; }
|
||||
|
||||
@Override
|
||||
public VariantContext convert(String name, Object input, ReferenceContext ref) {
|
||||
DbSNPFeature dbsnp = (DbSNPFeature)input;
|
||||
OldDbSNPFeature dbsnp = (OldDbSNPFeature)input;
|
||||
if ( ! Allele.acceptableAlleleBases(dbsnp.getNCBIRefBase()) )
|
||||
return null;
|
||||
Allele refAllele = Allele.create(dbsnp.getNCBIRefBase(), true);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
package org.broadinstitute.sting.gatk.walkers.variantutils;
|
||||
|
||||
import org.broad.tribble.TribbleException;
|
||||
import org.broad.tribble.dbsnp.DbSNPFeature;
|
||||
import org.broadinstitute.sting.commandline.*;
|
||||
import org.broadinstitute.sting.gatk.arguments.DbsnpArgumentCollection;
|
||||
import org.broadinstitute.sting.gatk.arguments.StandardVariantContextInputArgumentCollection;
|
||||
|
|
@ -41,7 +40,6 @@ import org.broadinstitute.sting.utils.variantcontext.VariantContext;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
|
|
@ -168,14 +166,9 @@ public class ValidateVariants extends RodWalker<Integer, Integer> {
|
|||
// get the RS IDs
|
||||
Set<String> rsIDs = null;
|
||||
if ( tracker.hasValues(dbsnp.dbsnp) ) {
|
||||
List<VariantContext> dbsnpList = tracker.getValues(dbsnp.dbsnp, ref.getLocus());
|
||||
rsIDs = new HashSet<String>();
|
||||
for ( Object d : dbsnpList ) {
|
||||
if (d instanceof DbSNPFeature )
|
||||
rsIDs.add(((DbSNPFeature)d).getRsID());
|
||||
else if (d instanceof VariantContext )
|
||||
rsIDs.add(((VariantContext)d).getID());
|
||||
}
|
||||
for ( VariantContext rsID : tracker.getValues(dbsnp.dbsnp, ref.getLocus()) )
|
||||
rsIDs.add(rsID.getID());
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class VariantsToVCFIntegrationTest extends WalkerTest {
|
|||
|
||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||
"-R " + b36KGReference +
|
||||
" --variant:dbsnp " + GATKDataLocation + "Comparisons/Validated/dbSNP/dbsnp_129_b36.rod" +
|
||||
" --variant:OldDbsnp " + GATKDataLocation + "Comparisons/Validated/dbSNP/dbsnp_129_b36.rod" +
|
||||
" -T VariantsToVCF" +
|
||||
" -L 1:1-30,000,000" +
|
||||
" -o %s" +
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,3 +1,3 @@
|
|||
<ivy-module version="1.0">
|
||||
<info organisation="org.broad" module="tribble" revision="23" status="integration" />
|
||||
<info organisation="org.broad" module="tribble" revision="24" status="integration" />
|
||||
</ivy-module>
|
||||
Loading…
Reference in New Issue