Exemple #1
0
 public static void PrintDictionaryContentsToConsole(WGCNA wgcnaobject)
 {
     foreach (KeyValuePair <string, double> entry in wgcnaobject.ExpData)
     {
         Console.WriteLine("Accession = {0}; Intensity = {1}", entry.Key, entry.Value);
     }
 }
Exemple #2
0
        public static double[,] CreatePearsonMatrix(this List <List <double> > intensitiesList)
        {
            int[] counts = intensitiesList.CountListsReturnInt();
            double[,] corrMatrix = new double[counts[0], counts[0]];

            for (int i = 0; i < counts[0]; i++)
            {
                for (int j = 0; j < counts[0]; j++)
                {
                    corrMatrix[i, j] = WGCNA.CalculatePearsonCorrelation(intensitiesList.ElementAt(i), intensitiesList.ElementAt(j));
                }
            }
            return(corrMatrix);
        }
Exemple #3
0
        static void Main()
        {
            string[] accessions   = { "P0001", "P0002", "P0003" };
            double[] intensities1 = { 15.0, 14.0, 13.0 };
            double[] intensities2 = { 16.0, 14.0, 12.0 };
            double[] intensities3 = { 17.0, 12, 11 };
            WGCNA    sample1      = new WGCNA(accessions, intensities1); sample1.Sample = "Sample1"; sample1.ExperimentalGroup = "Group1";
            WGCNA    sample2      = new WGCNA(accessions, intensities2); sample2.Sample = "Sample2"; sample2.ExperimentalGroup = "Group1";
            WGCNA    sample3      = new WGCNA(accessions, intensities3); sample3.Sample = "Sample3"; sample3.ExperimentalGroup = "Group1";
            WGCNA    sample4      = new WGCNA(accessions, intensities1); sample3.Sample = "Sample4"; sample3.ExperimentalGroup = "Group2";

            Experiment Experiment1 = new Experiment();

            Experiment1.AddSample(sample1);
            Experiment1.AddSample(sample2);
            Experiment1.AddSample(sample3);
            int beta = 12;

            Experiment1.PerformWGCNA(beta);
        }
Exemple #4
0
 public static double[,] CreateAdjacencyMatrix(this double[,] corrMatrix, int beta)
 {
     return(WGCNA.CreateAdjacencyMatrix(corrMatrix, beta));
 }