Exemple #1
0
        public void TestImagingTableIndexOutOfBoundsException()
        {
            imaging_table table = new imaging_table();

            try{
                System.Console.WriteLine(table.at(0u, (column_id)0));
                Assert.Fail("No exception thrown!");
            }catch (Illumina.InterOp.Metrics.index_out_of_bounds_exception) {}
        }
        public void PopulateTableTest()
        {
            int[] tmp = new int[] {
                2, 38
                , 7, 0, 90, 4, 1, 0, -12, -56, 15, 64, -98, 35, 12, 64, 0, 0, 0, 0, 0, 0, 0, 0, 46, 1, 17, 1, 0, 0, 0, 0, 96, -41, -104, 36, 122, -86, -46, -120
                , 7, 0, -66, 4, 1, 0, 96, -43, 14, 64, -63, 49, 13, 64, 0, 0, 0, 0, 0, 0, 0, 0, 56, 1, 17, 1, 0, 0, 0, 0, 112, 125, 77, 38, 122, -86, -46, -120
                , 7, 0, 66, 8, 1, 0, 74, -68, 6, 64, -118, -7, 8, 64, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 46, 1, 0, 0, 0, 0, -47, -104, 2, 40, 122, -86, -46, -120
            };
            byte[] expected_binary_data = new byte[tmp.Length];
            for (int i = 0; i < expected_binary_data.Length; i++)
            {
                expected_binary_data[i] = (byte)tmp[i];
            }
            run_metrics run = new run_metrics();

            c_csharp_comm.read_interop_from_buffer(expected_binary_data, (uint)expected_binary_data.Length, run.extraction_metric_set());

            var run_param = new parameters();

            Assert.AreEqual(run_param.version(), 0);
            Assert.AreEqual(run.extraction_metric_set().max_cycle(), 1);

            read_info_vector reads = new read_info_vector();

            reads.Add(new read_info(1, 1, 26));
            reads.Add(new read_info(2, 27, 76));
            run.run_info(new info(
                             "",
                             "",
                             1,
                             new flowcell_layout(2, 2, 2, 16),
                             new string_vector(),
                             new image_dimensions(),
                             reads
                             ));
            run.legacy_channel_update(instrument_type.HiSeq);

            imaging_table table = new imaging_table();

            c_csharp_table.create_imaging_table(run, table);
            Assert.AreEqual(table.row_count(), 3);
            Assert.AreEqual(table.at(0u, 0u), 7);
        }
Exemple #3
0
        public void TestImagingTableIndexOutOfBoundsException()
        {
            imaging_table table = new imaging_table();

            System.Console.WriteLine(table.at(0u, 0u));
        }
		public void PopulateTableTest()
		{
            int[] tmp = new int[]{
                 2,38
                 ,7,0,90,4,1,0,-12,-56,15,64,-98,35,12,64,0,0,0,0,0,0,0,0,46,1,17,1,0,0,0,0,96,-41,-104,36,122,-86,-46,-120
                 ,7,0,-66,4,1,0,96,-43,14,64,-63,49,13,64,0,0,0,0,0,0,0,0,56,1,17,1,0,0,0,0,112,125,77,38,122,-86,-46,-120
                 ,7,0,66,8,1,0,74,-68,6,64,-118,-7,8,64,0,0,0,0,0,0,0,0,93,1,46,1,0,0,0,0,-47,-104,2,40,122,-86,-46,-120
            };
            byte[] expected_binary_data = new byte[tmp.Length];
            for(int i=0;i<expected_binary_data.Length;i++) expected_binary_data[i] = (byte)tmp[i];
            run_metrics run = new run_metrics();
            c_csharp_comm.read_interop_from_buffer(expected_binary_data, (uint)expected_binary_data.Length, run.extraction_metric_set());

            var run_param = new parameters();
            Assert.AreEqual(run_param.version(), 0);
            Assert.AreEqual(run.extraction_metric_set().MaxCycle, 1);

            read_info_vector reads = new read_info_vector();
            reads.Add(new read_info(1, 1, 26));
            reads.Add(new read_info(2, 27, 76));
            run.run_info(new info(
                    "",
                    "",
                    1,
                    new flowcell_layout(2, 2, 2, 16),
                    new string_vector(),
                    new image_dimensions(),
                    reads
            ));
            run.legacy_channel_update(instrument_type.HiSeq);

            imaging_table table = new imaging_table();
            c_csharp_imaging.create_imaging_table(run, table);
            Assert.AreEqual(table.row_count(), 3);
            Assert.AreEqual(table.at(0, 0), 7);

		}