public CircleBasePairViewModel(CircleSequenceViewModel sequence, IBasePairEntity basePair)
 {
     _basePairEntity = basePair;
     _fivePrimeNt    = sequence.Sequence.RawData[_basePairEntity.FivePrimeIndex];
     _threePrimeNt   = sequence.Sequence.RawData[_basePairEntity.ThreePrimeIndex];
     Connector       = sequence.ComputeBinaryConnector(FivePrimeIndex, ThreePrimeIndex, MAX_RADIUS_FACTOR);
 }
 public PhyloDInteractionCircleViewModel(PhyloDInteraction interaction, CircleSequenceViewModel seqVM)
 {
     Data      = interaction;
     Visible   = false;
     Connector = seqVM.ComputeBinaryConnector(PredictorIndex, TargetIndex, 0.90);
     RegisterWithMessageMediator();
 }
Esempio n. 3
0
 public PhyloDCircleViewModel(CircleSequenceViewModel seqVM)
 {
     RegisterWithMessageMediator();
     _seqVM                    = seqVM;
     PhyloDElements            = new MTObservableCollection <PhyloDInteractionCircleViewModel>();
     IsInteractionDataLoaded   = false;
     IsInteractionDataFiltered = false;
 }
Esempio n. 4
0
        public override bool Initialize(IBioDataLoader data)
        {
            var sdloader = data as IBioDataLoader <IStructureModelBioEntity>;

            if (sdloader != null)
            {
                var basePairs = from bp in sdloader.Entities.OfType <IBasePairEntity>()
                                select bp;
                IBioEntity sequence = basePairs.First(bp => bp.Sequence != null).Sequence;

                _seqVM   = new CircleSequenceViewModel(sequence);
                PhyloDVM = new PhyloDCircleViewModel(_seqVM);
                LoadPhyloDDataCommand = new DelegatingCommand(_phyloDVM.OnLoadPhyloDData);
                Width  = _seqVM.Width;
                Height = _seqVM.Height;

                var basePairVM = from bp in basePairs
                                 select new CircleBasePairViewModel(_seqVM, bp);

                foreach (var vm in basePairVM)
                {
                    ModelElements.Add(vm);
                }
                ModelElements.Add(_seqVM);
                foreach (var vm in _seqVM.Elements)
                {
                    ModelElements.Add(vm);
                }
                foreach (var vm in _seqVM.TickMarks)
                {
                    ModelElements.Add(vm);
                }
                foreach (var vm in _seqVM.TickLabels)
                {
                    ModelElements.Add(vm);
                }
            }
            return(base.Initialize(data));
        }