예제 #1
0
		protected void SetUp()
		{
	        base_cycle_metric_header header = new base_cycle_metric_header();
		    if(metrics.Count == 0)
		    {
                System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();
                timer.Start();
                float[] focus1 = new float[]{2.24664021f, 2.1896739f, 0, 0};
                ushort[] p90_1  = new ushort[]{302, 273, 0, 0};
                for(uint lane = 1;lane <=8;lane++)
                {
                    for(uint tile = 1;tile <=TileCount;tile++)
                    {
                        for(uint cycle = 1;cycle <=318;cycle++)
                        {
                            metrics.Add(new extraction_metric(lane, tile, cycle, new csharp_date_time(9859129975844165472ul), (p90_1), (focus1), 4));
                        }
                    }
                }
                extraction_metric_set = new base_extraction_metrics(metrics, Version, header);
                timer.Stop();
                System.Console.WriteLine("Setup: " + timer.Elapsed.Hours +" : " + timer.Elapsed.Minutes +" : " + timer.Elapsed.Seconds);
                System.Console.WriteLine("Size: " + metrics.Count + " - " + extraction_metric_set.size());
		    }
		}
예제 #2
0
		protected void SetUp()
		{
	        base_cycle_metric_header header = new base_cycle_metric_header();
            float[] focus1 = new float[]{2.24664021f, 2.1896739f, 0, 0};
            ushort[] p90_1  = new ushort[]{302, 273, 0, 0};
			expected_metrics.Add(new extraction_metric(7, 1114, 1, new csharp_date_time(9859129975844165472ul), (p90_1), (focus1), 4));
			float[] focus2 = new float[]{2.23177338f, 2.20616174f, 0, 0};
            ushort[] p90_2  = new ushort[]{312, 273, 0, 0};
			expected_metrics.Add(new extraction_metric(7, 1214, 1, new csharp_date_time(9859129975872781680ul), (p90_2), (focus2), 4));
			float[] focus3 = new float[]{2.10524225f, 2.14023066f, 0, 0};
            ushort[] p90_3  = new ushort[]{349, 302, 0, 0};
			expected_metrics.Add(new extraction_metric(7, 2114, 1, new csharp_date_time(9859129975901427921ul), (p90_3), (focus3), 4));

			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
			};
			expected_binary_data = new byte[tmp.Length];
			for(int i=0;i<expected_binary_data.Length;i++) expected_binary_data[i] = (byte)tmp[i];
			expected_metric_set = new base_extraction_metrics(expected_metrics, Version, header);
			c_csharp_comm.read_interop_from_buffer(expected_binary_data, (uint)expected_binary_data.Length, actual_metric_set);
			actual_metrics = actual_metric_set.metrics();
		}
예제 #3
0
        protected void SetUp()
        {
            extraction_metric_header header = new extraction_metric_header(2);

            if (metrics.Count == 0)
            {
                System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch();
                timer.Start();
                float[]  focus1 = new float[] { 2.24664021f, 2.1896739f, 0, 0 };
                ushort[] p90_1  = new ushort[] { 302, 273, 0, 0 };
                for (uint lane = 1; lane <= 8; lane++)
                {
                    for (uint tile = 1; tile <= TileCount; tile++)
                    {
                        for (uint cycle = 1; cycle <= 318; cycle++)
                        {
                            metrics.Add(new extraction_metric(lane, tile, cycle, new csharp_date_time(9859129975844165472ul), (p90_1), (focus1), 4));
                        }
                    }
                }
                extraction_metric_set = new base_extraction_metrics(metrics, Version, header);
                timer.Stop();
                System.Console.WriteLine("Setup: " + timer.Elapsed.Hours + " : " + timer.Elapsed.Minutes + " : " + timer.Elapsed.Seconds);
                System.Console.WriteLine("Size: " + metrics.Count + " - " + extraction_metric_set.size());
            }
        }
예제 #4
0
        protected void SetUp()
        {
            extraction_metric_header header = new extraction_metric_header(2);

            float[]  focus1 = new float[] { 2.24664021f, 2.1896739f, 0, 0 };
            ushort[] p90_1  = new ushort[] { 302, 273, 0, 0 };
            expected_metrics.Add(new extraction_metric(7, 1114, 1, new csharp_date_time(9859129975844165472ul), (p90_1), (focus1), 4));
            float[]  focus2 = new float[] { 2.23177338f, 2.20616174f, 0, 0 };
            ushort[] p90_2  = new ushort[] { 312, 273, 0, 0 };
            expected_metrics.Add(new extraction_metric(7, 1214, 1, new csharp_date_time(9859129975872781680ul), (p90_2), (focus2), 4));
            float[]  focus3 = new float[] { 2.10524225f, 2.14023066f, 0, 0 };
            ushort[] p90_3  = new ushort[] { 349, 302, 0, 0 };
            expected_metrics.Add(new extraction_metric(7, 2114, 1, new csharp_date_time(9859129975901427921ul), (p90_3), (focus3), 4));

            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
            };
            expected_binary_data = new byte[tmp.Length];
            for (int i = 0; i < expected_binary_data.Length; i++)
            {
                expected_binary_data[i] = (byte)tmp[i];
            }
            expected_metric_set = new base_extraction_metrics(expected_metrics, Version, header);
            c_csharp_comm.read_interop_from_buffer(expected_binary_data, (uint)expected_binary_data.Length, actual_metric_set);
        }
예제 #5
0
 public void set_extraction_metric_set(base_extraction_metrics metrics)
 {
     c_csharp_run_metricsPINVOKE.run_metrics_set_extraction_metric_set(swigCPtr, base_extraction_metrics.getCPtr(metrics));
     if (c_csharp_run_metricsPINVOKE.SWIGPendingException.Pending)
     {
         throw c_csharp_run_metricsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #6
0
	static int Main(string[] args)
	{

        int ret;
        if((ret = Helper.CheckArguments(args)) != 0) return ret;

		base_extraction_metrics extraction_metric_set = new base_extraction_metrics ();
		if ((ret = Helper.ReadInterop (args [0], extraction_metric_set)) != 0)
			return ret;

		Console.WriteLine("Time: {0}", DateTime.FromBinary((Int64)extraction_metric_set.AllMetrics.ToList()[0].date_time_csharp().value));
		return 0;
	}
예제 #7
0
 public static void copy_focus(base_extraction_metrics metrics, float[] focus_scores, uint channel, uint n)
 {
     unsafe
     {
         fixed(float *swig_ptrTo_focus_scores = focus_scores)
         {
             {
                 c_csharp_run_metricsPINVOKE.copy_focus(base_extraction_metrics.getCPtr(metrics), (global::System.IntPtr)swig_ptrTo_focus_scores, channel, n);
                 if (c_csharp_run_metricsPINVOKE.SWIGPendingException.Pending)
                 {
                     throw c_csharp_run_metricsPINVOKE.SWIGPendingException.Retrieve();
                 }
             }
         }
     }
 }
예제 #8
0
    static int Main(string[] args)
    {
        int ret;

        if ((ret = Helper.CheckArguments(args)) != 0)
        {
            return(ret);
        }

        base_extraction_metrics extraction_metric_set = new base_extraction_metrics();

        if ((ret = Helper.ReadInterop(args [0], extraction_metric_set)) != 0)
        {
            return(ret);
        }

        Console.WriteLine("Time: {0}", DateTime.FromBinary((Int64)extraction_metric_set.at(0).date_time_csharp().value));
        return(0);
    }
예제 #9
0
        public void TestDispose()
        {
            run_metrics tmp = new run_metrics();

            using (base_extraction_metrics set = tmp.extraction_metric_set())
            {
                ushort_vector tmp1 = new ushort_vector();
                float_vector  tmp2 = new float_vector();
                set.insert(new extraction_metric(1, 1, 1, tmp1, tmp2));
            }
            using (base_extraction_metrics set = tmp.extraction_metric_set())
            {
                Assert.AreEqual((int)set.size(), 1);
            }
            using (base_extraction_metrics set = tmp.extraction_metric_set())
            {
                Assert.AreEqual((int)set.at(0).lane(), 1);
            }
        }
예제 #10
0
 public static int ReadInterop(string filename, base_extraction_metrics extraction_metric_set)
 {
     try
     {
         c_csharp_comm.read_interop(filename, extraction_metric_set);
     }
     catch (incomplete_file_exception) {}
     catch (file_not_found_exception ex)
     {
         Console.WriteLine("File not found: " + filename);
         Console.WriteLine(ex);
         return(1);
     }
     catch (bad_format_exception ex)
     {
         Console.WriteLine(ex);
         return(1);
     }
     return(0);
 }
예제 #11
0
        public void Test_incomplete_file_exception()
        {
            int[] tmp = new int[] {
                3, 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];
            }
            base_extraction_metrics expected_metric_set = new base_extraction_metrics();

            try{
                c_csharp_comm.read_interop_from_buffer(expected_binary_data, (uint)expected_binary_data.Length, expected_metric_set);
                Assert.Fail("No exception thrown!");
            }catch (Illumina.InterOp.Comm.incomplete_file_exception) {}
        }
예제 #12
0
	public static int ReadInterop(string filename, base_extraction_metrics extraction_metric_set)
	{
		try
		{
			c_csharp_comm.read_interop (filename, extraction_metric_set);
		}
		catch(incomplete_file_exception){}
		catch(file_not_found_exception ex)
		{

			Console.WriteLine("File not found: "+filename);
			Console.WriteLine (ex);
			return 1;
		}
		catch(bad_format_exception ex)
		{
			Console.WriteLine (ex);
			return 1;
		}
		return 0;
	}
예제 #13
0
        public base_extraction_metrics extraction_metric_set()
        {
            base_extraction_metrics ret = new base_extraction_metrics(c_csharp_run_metricsPINVOKE.run_metrics_extraction_metric_set(swigCPtr), false);

            return(ret);
        }