deleting/archiving as instructed

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3765 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-07-12 16:59:45 +00:00
parent 8086ab1f75
commit 221e01fb27
4 changed files with 0 additions and 177 deletions

View File

@ -1,59 +0,0 @@
package org.broadinstitute.sting.oneoffprojects.walkers.annotator;
import org.broad.tribble.vcf.VCFHeaderLineType;
import org.broad.tribble.vcf.VCFInfoHeaderLine;
import org.broad.tribble.vcf.VCFRecord;
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
import org.broadinstitute.sting.gatk.contexts.StratifiedAlignmentContext;
import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
import org.broadinstitute.sting.gatk.walkers.annotator.interfaces.InfoFieldAnnotation;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.Arrays;
/**
* IF THERE IS NO JAVADOC RIGHT HERE, YELL AT chartl
*
* @author chartl
* @date Feb 1, 2010
*/
public class ThousandGenomesAnnotator implements InfoFieldAnnotation {
public List<String> getKeyNames() {
return Arrays.asList("1KG");
}
public List<VCFInfoHeaderLine> getDescriptions() {
return Arrays.asList(new VCFInfoHeaderLine(getKeyNames().get(0),
1, VCFHeaderLineType.String,"Is this site seen in Pilot1 or Pilot2 of 1KG?"));
}
public Map<String, Object> annotate(RefMetaDataTracker tracker, ReferenceContext ref, Map<String, StratifiedAlignmentContext> context, VariantContext vc) {
if ( tracker == null )
return null;
VCFRecord pilot1 = tracker.lookup("pilot1", VCFRecord.class);
VCFRecord pilot2 = tracker.lookup("pilot2", VCFRecord.class);
String result;
if ( pilot1 == null && pilot2 == null) {
result = "0";
} else {
if ( pilot1 != null && ! pilot1.isFiltered() ) {
result = "1";
} else if ( pilot2 != null && !pilot2.isFiltered() ) {
result = "1";
} else {
result = "0";
}
}
Map<String, Object> map = new HashMap<String, Object>();
map.put(getKeyNames().get(0), result);
return map;
}
}

View File

@ -1,83 +0,0 @@
package org.broadinstitute.sting.gatk.walkers.annotator;
import org.broadinstitute.sting.WalkerTest;
import org.junit.Test;
import java.util.Arrays;
/**
* Created by IntelliJ IDEA.
* User: chartl
* Date: Nov 17, 2009
* Time: 6:58:09 PM
* To change this template use File | Settings | File Templates.
*/
public class SecondBaseSkewIntegrationTest extends WalkerTest {
// TODO -- reinstitute these integration tests when GELI -> VariantContext is supported
//@Test
public void secondBaseSkewTest() {
for ( int test = 1; test <= 2; test ++ ) {
String bamFilePath = VariantAnnotatorIntegrationTest.validationDataPath()+VariantAnnotatorIntegrationTest.secondBaseTestFile(test)+".a2b.recal.annotation_subset.bam";
String callFile = VariantAnnotatorIntegrationTest.validationDataPath()+VariantAnnotatorIntegrationTest.secondBaseTestFile(test)+".a2b.ssg1b.geli.calls";
String args = VariantAnnotatorIntegrationTest.secondBaseTestString()+" -I "+bamFilePath+" -B variant,Variants,"+callFile+" "+VariantAnnotatorIntegrationTest.secondBaseTestInterval(test)+" -sample variant";
WalkerTestSpec spec = new WalkerTestSpec(args,1, Arrays.asList(VariantAnnotatorIntegrationTest.secondBaseTestmd5(test)));
executeTest("Second base skew annotator, test number "+Integer.toString(test), spec);
}
}
//@Test
public void testOnE2File() {
String test_args = "-T VariantAnnotator -A SecondBaseSkew "
+"-R " + seqLocation + "references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta "
+"-I " + validationDataLocation + "FHSP_pool3_2bannot.bam "
+"-B variant,Variants," + validationDataLocation + "FHS_pilot_pool3_raw_calls.geli "
+"-o %s -sample variant -L " + validationDataLocation + "FHS_test_intervals.interval_list";
String md5_for_this_test = "c1116b3196cc9f553ae2442a4063bc5e";
WalkerTestSpec spec = new WalkerTestSpec(test_args,1, Arrays.asList(md5_for_this_test));
executeTest("Testing on E2 annotated but not Q2 annotated file ",spec);
}
//@Test
public void testOnUnannotatedFile() {
String test_args = "-T VariantAnnotator -A SecondBaseSkew "
+"-R " + seqLocation + "references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta "
+"-I " + validationDataLocation + "FHSP_pool3_test.bam "
+"-B variant,Variants," + validationDataLocation + "FHS_pilot_pool3_raw_calls.geli "
+"-o %s -sample variant -L " + validationDataLocation + "FHS_test_intervals.interval_list";
String md5_for_this_test = "a297259694ac88f769a45bce96a08e51";
WalkerTestSpec spec = new WalkerTestSpec(test_args,1, Arrays.asList(md5_for_this_test));
executeTest("Testing on bam file without 2bb annotations ",spec);
}
@Test
public void testOnIndels() {
String test_args = "-T VariantAnnotator -I " + validationDataLocation + "FHS_Pileup_Test.bam"
+ " -R " + seqLocation + "references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta -A SecondBaseSkew"
+ " -sample variant -B variant,VCF," + validationDataLocation + "FHS_pileup_test_chr15.vcf"
+ " -o %s -L chr15:46347148";
String expected_md5 = "f4aff94a713fcf4dc5750d6a6a884ad3";
WalkerTestSpec spec = new WalkerTestSpec(test_args,1,Arrays.asList(expected_md5));
executeTest("Testing on locus with many indels", spec);
}
// todo -- chris needs to fix this
// @Test
// public void testPrimaryBaseSecondaryBaseOnIndels() {
// String test_args = "-T VariantAnnotator -I /humgen/gsa-scr1/GATK_Data/Validation_Data/FHS_Pileup_Test.bam"
// + " -R /seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta -A PrimaryBaseSecondaryBaseSymmetry"
// + " -sample variant -B variant,VCF,/humgen/gsa-scr1/GATK_Data/Validation_Data/FHS_pileup_test_chr15.vcf"
// + " -vcf %s -L chr15:46347148";
// String expected_md5 = "9b587be7a270c6df7e0affcfc61a861a";
// WalkerTestSpec spec = new WalkerTestSpec(test_args,1,Arrays.asList(expected_md5));
// executeTest("Testing PrimaryBaseSeHcondaryBaseSymmetry on locus with many indels", spec);
// }
}

View File

@ -1,51 +1,16 @@
package org.broadinstitute.sting.gatk.walkers.annotator;
import org.broadinstitute.sting.WalkerTest;
import org.broadinstitute.sting.utils.StingException;
import org.junit.Test;
import java.util.Arrays;
public class VariantAnnotatorIntegrationTest extends WalkerTest {
public static String secondBaseTestString() {
return "-T VariantAnnotator -R " + seqLocation + "references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta -vcf %s -A SecondBaseSkew";
}
public static String validationDataPath() {
return validationDataLocation + "";
}
public static String secondBaseTestFile( int testNo ) {
switch ( testNo ) {
case 1: return "NA12891";
case 2: return "NA20762";
default: throw new StingException("Impossible test has been run: secondbasetest number "+ testNo);
}
}
public static String secondBaseTestInterval ( int testNo ) {
switch ( testNo ) {
case 1: return "-L chr1:14,000,000-18,000,000";
case 2: return "-L chr22:20660081-20660083 -L chr22:29198100-29198104 -L chr22:29821330-29821334";
default: throw new StingException("Impossible test has been run: secondbasetest number "+testNo);
}
}
public static String secondBaseTestmd5( int testNo ) {
switch ( testNo ) {
case 1: return "bf64bac186fd682018dd7f0419d90190";
case 2: return "67f40627b12be31efe02c9d853fbcf37";
default: throw new StingException("Impossible test has been run: secondbasetest number "+testNo);
}
}
public static String baseTestString() {
return "-T VariantAnnotator -R " + oneKGLocation + "reference/human_b36_both.fasta -o %s";
}
@Test
public void testHasAnnotsNotAsking1() {
WalkerTestSpec spec = new WalkerTestSpec(