From b60a5925d0ba5e99a9e4edf44a2ee6015775dd35 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 18 Apr 2014 10:14:54 +0100 Subject: [PATCH] JAL-1466 import full length sequence to dataset sequence or trim it to local sequence's length --- src/jalview/ws/DBRefFetcher.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/jalview/ws/DBRefFetcher.java b/src/jalview/ws/DBRefFetcher.java index a156b2c..d742eaa 100644 --- a/src/jalview/ws/DBRefFetcher.java +++ b/src/jalview/ws/DBRefFetcher.java @@ -577,6 +577,7 @@ public class DBRefFetcher implements Runnable // mappings are made (but content matches retrieved set) boolean updateRefFrame = sequence.getDBRef() == null || sequence.getDBRef().length == 0; + // TODO: // verify sequence against the entry sequence String nonGapped = AlignSeq.extractGaps("-. ", @@ -660,8 +661,14 @@ public class DBRefFetcher implements Runnable if (updateRefFrame) { // finally, update local sequence reference frame if we're allowed - sequence.setStart(absStart); - sequence.setEnd(absEnd); + if (trimDatasetSeqs) { + // just fix start/end + sequence.setStart(absStart); + sequence.setEnd(absEnd); + } else { + // insert full length sequence from record + sequence.setSequence(entry.getSequenceAsString()); + } // search for alignment sequences to update coordinate frame for for (int alsq = 0; alsq < alseqs.length; alsq++) { -- 1.7.10.2