SequenceFeatures and dataset sequences

​As discussed yesterday with Jim, I’ve hit this problem:

  • currently, sequences in the Desktop version hold dataset sequences, but the applet sequences don’t

  • in the Desktop, SequenceFeatures are attached to the dataset sequence, in the applet to the sequence

  • there are about 65 calls to Sequence.getSequenceFeatures() with various flavours of how to retrieve this data

  • for cDNA/protein mapping to work in the applet, I want to create dataset sequences - breaking some of this code

Suggested solution:

  1. change method Sequence.getSequenceFeatures() so it searches the sequence or dataset sequence until it finds sequence features (or not)
  • i.e. use the same logic as currently in FeatureRendererModel.findFeaturesAtRes()
  1. track down and change any code that does this (example: AlignmentSorter.sortByFeature())

SequenceFeatures sf = seq.getSequenceFeatures();

// remove these lines:

if (sf.getDatasetSequence() != null) {

sf = sf.getDatasetSequence().getSequenceFeatures();

}

I think that’s the safest way to keep everything happy, but I’m open to objections or better suggestions.

What I haven’t explored is whether there are similar problems elsewhere triggered by creating dataset sequences in the applet. Sequence.getDBRef() might be a similar case?

Mungo

The University of Dundee is a registered Scottish Charity, No: SC015096

···

Mungo Carstairs
Jalview Computational Scientist
The Barton Group
Division of Computational Biology
College of Life Sciences
University of Dundee, Dundee, Scotland, UK.
www.jalview.org
www.compbio.dundee.ac.uk

This is the right time to do it! refactoring to a branch off the develop branch should lead to the maximisation of sanity…

···

On 18/02/2015 09:27, Mungo Carstairs (Staff) wrote:

-- 
-------------------------------------------------------------------
Dr JB Procter, Jalview Coordinator, The Barton Group
Division of Computational Biology, College of Life Sciences
University of Dundee, Dundee DD1 5EH, UK.
+44 1382 388734 | [www.jalview.org](http://www.jalview.org) | [www.compbio.dundee.ac.uk](http://www.compbio.dundee.ac.uk) 
The University of Dundee is registered Scottish charity: No.SC015096