Beispiel #1
0
        public static void GetMotiffs(GetMotiffsParams pars, ElementGroup[] elPeaks, ElementGroup[] elNoise, out Motiff[] mfPeaks, out Motiff[] mfNoise)
        {
            var peakClustering = new Clustering(elPeaks);
            var emptyClustering = new Clustering(elNoise);

            var peakClusters = peakClustering.Work3(pars.CutWeight, pars.Seed, pars.SetCoreWeights);
            var emptyClusters = emptyClustering.Work3(pars.CutWeight, pars.Seed, pars.SetCoreWeights);

            var peakClusters2 = peakClusters.Where(p => p.TotalCount > pars.SkipClusterSize).Select(p => p.Align()).ToArray();
            var emptyClusters2 = emptyClusters.Where(p => p.TotalCount > pars.SkipClusterSize).Select(p => p.Align()).ToArray();

            var peakMotifs = peakClusters2.Select(p => Motiff.ExtractMotiff(p.Map, p.MapFactors)).ToArray();
            var emptyMotifs = emptyClusters2.Select(p => Motiff.ExtractMotiff(p.Map, p.MapFactors)).ToArray();

            if (pars.CrossTest)
            {
                TransMotiffTest(peakMotifs, peakClusters2, "peaks vs peaks");
                TransMotiffTest(peakMotifs, emptyClusters2, "peaks vs empty");

                TransMotiffTest(emptyMotifs, emptyClusters2, "empty vs empty");
                TransMotiffTest(emptyMotifs, peakClusters2, "empty vs peaks");
            }

            mfPeaks = peakMotifs;
            mfNoise = emptyMotifs;
        }
Beispiel #2
0
 public DiffMotiff(Motiff[] posMotiffs, Motiff[] negMotiffs)
 {
     _posMotiffs = posMotiffs;
     _negMotiffs = negMotiffs;
 }