X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fvcf%2FVCFLoader.java;h=de2f18ad7fa812fefb35350307fff2ed6b1ac322;hb=4073e96c3cb60f28c01cd91ec7f847cafbf01f78;hp=9addfaaa68a6c7861a49e6d919daa95ffa578549;hpb=296593216c47a835f462d1d74a40b41e4818f737;p=jalview.git diff --git a/src/jalview/io/vcf/VCFLoader.java b/src/jalview/io/vcf/VCFLoader.java index 9addfaa..de2f18a 100644 --- a/src/jalview/io/vcf/VCFLoader.java +++ b/src/jalview/io/vcf/VCFLoader.java @@ -1013,6 +1013,10 @@ public class VCFLoader { String type = SequenceOntologyI.SEQUENCE_VARIANT; + /* + * could we associate Consequence data with this allele and feature (transcript)? + * if so, prefer the consequence term from that data + */ if (csqAlleleFieldIndex == -1) // && snpEffAlleleFieldIndex == -1 { /* @@ -1021,10 +1025,6 @@ public class VCFLoader return type; } - /* - * can we associate Consequence data with this allele and feature (transcript)? - * if so, prefer the consequence term from that data - */ if (consequence != null) { String[] csqFields = consequence.split(PIPE_REGEX); @@ -1190,6 +1190,14 @@ public class VCFLoader } /* + * filter out fields we don't want to capture + */ + if (!vcfFieldsOfInterest.contains(key)) + { + continue; + } + + /* * we extract values for other data which are allele-specific; * these may be per alternate allele (INFO[key].Number = 'A') * or per allele including reference (INFO[key].Number = 'R') @@ -1249,7 +1257,6 @@ public class VCFLoader String myConsequence) { Object value = variant.getAttribute(CSQ_FIELD); - // TODO if CSQ not present, try ANN (for SnpEff consequence data)? if (value == null || !(value instanceof List)) {