reallow MNP events through
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3740 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
ed0d0d78fa
commit
6e6ad36523
|
|
@ -387,7 +387,7 @@ public class VCF4Codec implements FeatureCodec, NameAwareCodec {
|
|||
|
||||
// find out our current location, and clip the alleles down to their minimum length
|
||||
Pair<GenomeLoc, List<Allele>> locAndAlleles;
|
||||
if ( hasIndel(alleles) ) {
|
||||
if ( !isSingleNucleotideEvent(alleles) ) {
|
||||
attributes.put(ORIGINAL_ALLELE_LIST,alleles);
|
||||
locAndAlleles = clipAlleles(contig, pos, ref, alleles);
|
||||
} else {
|
||||
|
|
@ -405,13 +405,12 @@ public class VCF4Codec implements FeatureCodec, NameAwareCodec {
|
|||
return new VariantContext(name, locAndAlleles.first, locAndAlleles.second, genotypes, qual, filters, attributes);
|
||||
}
|
||||
|
||||
private boolean hasIndel(List<Allele> alleles) {
|
||||
int lengthOfFirstEntry = alleles.get(0).length();
|
||||
for ( int i = 1; i < alleles.size(); i++ ) {
|
||||
if ( alleles.get(i).length() != lengthOfFirstEntry )
|
||||
return true;
|
||||
private boolean isSingleNucleotideEvent(List<Allele> alleles) {
|
||||
for ( Allele a : alleles ) {
|
||||
if ( a.length() > 1 )
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
class VCFParserException extends StingException {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class PickSequenomProbesIntegrationTest extends WalkerTest {
|
|||
String testVCF = validationDataLocation + "complexExample.vcf";
|
||||
String testArgs = "-R "+oneKGLocation+"reference/human_b36_both.fasta -T PickSequenomProbes -L 1:10,000,000-11,000,000 -B input,VCF,"+testVCF+" -o %s";
|
||||
WalkerTestSpec spec = new WalkerTestSpec(testArgs, 1,
|
||||
Arrays.asList("368f6f61e7a99b33f74aab2cf055554e"));
|
||||
Arrays.asList("0f356354a4a78ff62b2848431ec11262"));
|
||||
executeTest("Test probes", spec);
|
||||
}
|
||||
|
||||
|
|
@ -26,4 +26,4 @@ public class PickSequenomProbesIntegrationTest extends WalkerTest {
|
|||
Arrays.asList("cb1f57e8bcaec4b599be075b6d5288a1"));
|
||||
executeTest("Test probes", spec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue