git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3376 capture VCF POS, ID, QUAL, FILTER as feature attributes
[jalview.git]
/
test
/
jalview
/
io
/
vcf
/
VCFLoaderTest.java
diff --git
a/test/jalview/io/vcf/VCFLoaderTest.java
b/test/jalview/io/vcf/VCFLoaderTest.java
index
808fe86
..
1e88665
100644
(file)
--- a/
test/jalview/io/vcf/VCFLoaderTest.java
+++ b/
test/jalview/io/vcf/VCFLoaderTest.java
@@
-71,10
+71,10
@@
public class VCFLoaderTest
// A/T,C variants in position 2 of gene sequence (precedes transcript)
// should create 2 variant features with respective AF values
// malformed values for AC_Female and AF_AFR should be ignored
// A/T,C variants in position 2 of gene sequence (precedes transcript)
// should create 2 variant features with respective AF values
// malformed values for AC_Female and AF_AFR should be ignored
- "17\t45051611\t.\tA\tT,C\t1666.64\tRF\tAC=15;AF=5.0e-03,4.0e-03;AC_Female=12,3d;AF_AFR=low,2.3e-4",
+ "17\t45051611\trs384765\tA\tT,C\t1666.64\tRF;XYZ\tAC=15;AF=5.0e-03,4.0e-03;AC_Female=12,3d;AF_AFR=low,2.3e-4",
// SNP G/C in position 4 of gene sequence, position 2 of transcript
// insertion G/GA is transferred to nucleotide but not to peptide
// SNP G/C in position 4 of gene sequence, position 2 of transcript
// insertion G/GA is transferred to nucleotide but not to peptide
- "17\t45051613\t.\tG\tGA,C\t1666.65\tRF\tAC=15;AF=3.0e-03,2.0e-03",
+ "17\t45051613\t.\tG\tGA,C\t1666.65\t.\tAC=15;AF=3.0e-03,2.0e-03",
// '.' in INFO field should be ignored
"17\t45051615\t.\tG\tC\t1666.66\tRF\tAC=16;AF=." };
// '.' in INFO field should be ignored
"17\t45051615\t.\tG\tC\t1666.66\tRF\tAC=16;AF=." };
@@
-130,6
+130,10
@@
public class VCFLoaderTest
assertEquals(sf.getValue("AF_AFR"), "2.3e-4");
assertEquals(sf.getValue(Gff3Helper.ALLELES), "A,C");
assertEquals(sf.getType(), SEQUENCE_VARIANT);
assertEquals(sf.getValue("AF_AFR"), "2.3e-4");
assertEquals(sf.getValue(Gff3Helper.ALLELES), "A,C");
assertEquals(sf.getType(), SEQUENCE_VARIANT);
+ assertEquals(sf.getValue("POS"), "45051611");
+ assertEquals(sf.getValue("ID"), "rs384765");
+ assertEquals(sf.getValue("QUAL"), "1666.64");
+ assertEquals(sf.getValue("FILTER"), "RF;XYZ");
// malformed integer for AC_Female is ignored (JAL-3375)
assertNull(sf.getValue("AC_Female"));
// malformed integer for AC_Female is ignored (JAL-3375)
assertNull(sf.getValue("AC_Female"));
@@
-165,6
+169,8
@@
public class VCFLoaderTest
assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03,
DELTA);
assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GA");
assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03,
DELTA);
assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GA");
+ assertNull(sf.getValue("ID")); // '.' is ignored
+ assertNull(sf.getValue("FILTER")); // '.' is ignored
sf = geneFeatures.get(4);
assertEquals(sf.getFeatureGroup(), "VCF");
sf = geneFeatures.get(4);
assertEquals(sf.getFeatureGroup(), "VCF");