コード例 #1
0
ファイル: Example2.cs プロジェクト: Illumina/interop
	static int Main(string[] args)
	{

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

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

        Dictionary<uint, TileSummary> lane_summary_map = new Dictionary<uint, TileSummary>();
        foreach(var metric in tile_metric_set.metrics())
        {
			if (!lane_summary_map.ContainsKey (metric.lane ()))
				lane_summary_map.Add (metric.lane (), new TileSummary ());
            lane_summary_map[metric.lane()].cluster_count += metric.clusterCount();
            lane_summary_map[metric.lane()].cluster_count_pf += metric.clusterCountPf();
            lane_summary_map[metric.lane()].tile_count += 1;
        }
		foreach (KeyValuePair<uint, TileSummary> pair in lane_summary_map)
        {
			Console.WriteLine("Lane: {0}", pair.Key);
            Console.WriteLine("Tiles: {0}", pair.Value.tile_count);
			Console.WriteLine("Cluster PF (%): {0}", pair.Value.cluster_count_pf /  pair.Value.cluster_count * 100);
        }

		return 0;
	}
コード例 #2
0
ファイル: Example1.cs プロジェクト: Illumina/interop
	static int Main(string[] args)
	{
		if (args.Length != 1)
		{
			if (args.Length < 1)
				Console.WriteLine ("No run folder");
			else
				Console.WriteLine ("Too many arguments");
			return 1;
		}


		base_tile_metrics tile_metric_set = new base_tile_metrics ();
		try
		{
			c_csharp_comm.read_interop (args [0], tile_metric_set);
		}
		catch(incomplete_file_exception){}
		catch(file_not_found_exception ex)
		{

			Console.WriteLine("File not found: "+args [0]);
			Console.WriteLine (ex);
			return 1;
		}
		catch(bad_format_exception ex)
		{
			Console.WriteLine (ex);
			return 1;
		}
		Console.Write ("Tile metric set contains {0} metrics", tile_metric_set.size());
		return 0;
	}
コード例 #3
0
 public static void summarize_index_metrics(base_index_metrics index_metrics, base_tile_metrics tile_metrics, uint lane_count, index_flowcell_summary summary)
 {
     c_csharp_summaryPINVOKE.summarize_index_metrics__SWIG_1(base_index_metrics.getCPtr(index_metrics), base_tile_metrics.getCPtr(tile_metrics), lane_count, index_flowcell_summary.getCPtr(summary));
     if (c_csharp_summaryPINVOKE.SWIGPendingException.Pending)
     {
         throw c_csharp_summaryPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #4
0
 public void set_tile_metric_set(base_tile_metrics metrics)
 {
     c_csharp_run_metricsPINVOKE.run_metrics_set_tile_metric_set(swigCPtr, base_tile_metrics.getCPtr(metrics));
     if (c_csharp_run_metricsPINVOKE.SWIGPendingException.Pending)
     {
         throw c_csharp_run_metricsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #5
0
        public void TestTileMetricsIndexOutOfBoundsException()
        {
            base_tile_metrics summary = new base_tile_metrics();

            try{
                System.Console.WriteLine(summary.at(0u));
                Assert.Fail("No exception thrown!");
            }catch (Illumina.InterOp.Metrics.index_out_of_bounds_exception) {}
        }
コード例 #6
0
        protected void SetUp()
        {
            read_metric_vector read1 = new read_metric_vector();

            read1.Add(new read_metric(1, 2.61630869f, 0.0797112584f, 0.119908921f));
            expected_metrics.Add(new tile_metric(7, 1114, 2355119.25f, 1158081.50f, 6470949, 3181956, read1));
            read_metric_vector read2 = new read_metric_vector();

            read2.Add(new read_metric(1, 2.62243795f, 0.129267812f, 0.135128692f));
            expected_metrics.Add(new tile_metric(7, 1214, 2355119.25f, 1174757.75f, 6470949, 3227776, read2));
            read_metric_vector read3 = new read_metric_vector();

            read3.Add(new read_metric(1, 2.490309f, 0.11908555f, 0.092706576f));
            expected_metrics.Add(new tile_metric(7, 2114, 2355119.25f, 1211592.38f, 6470949, 3328983, read3));

            int[] tmp = new int[] { 2, 10
                                    , 7, 0, 90, 4, 100, 0, -67, -66, 15, 74
                                    , 7, 0, 90, 4, 102, 0, 74, 122, -59, 74
                                    , 7, 0, 90, 4, 101, 0, 12, 94, -115, 73
                                    , 7, 0, 90, 4, 103, 0, 16, 54, 66, 74
                                    , 7, 0, 90, 4, -56, 0, 82, -11, 80, 58
                                    , 7, 0, 90, 4, -55, 0, -62, 42, -99, 58
                                    , 7, 0, 90, 4, 44, 1, -102, 113, 39, 64
                                    , 7, 0, -66, 4, 100, 0, -67, -66, 15, 74
                                    , 7, 0, -66, 4, 102, 0, 74, 122, -59, 74
                                    , 7, 0, -66, 4, 101, 0, 46, 103, -113, 73
                                    , 7, 0, -66, 4, 103, 0, 0, 2, 69, 74
                                    , 7, 0, -66, 4, -56, 0, 21, 111, -87, 58
                                    , 7, 0, -66, 4, -55, 0, -86, 29, -79, 58
                                    , 7, 0, -66, 4, 44, 1, 6, -42, 39, 64
                                    , 7, 0, 66, 8, 100, 0, -67, -66, 15, 74
                                    , 7, 0, 66, 8, 102, 0, 74, 122, -59, 74
                                    , 7, 0, 66, 8, 101, 0, 67, -26, -109, 73
                                    , 7, 0, 66, 8, 103, 0, 92, 47, 75, 74
                                    , 7, 0, 66, 8, -56, 0, 123, 22, -100, 58
                                    , 7, 0, 66, 8, -55, 0, 85, 6, 115, 58
                                    , 7, 0, 66, 8, 44, 1, 57, 97, 31, 64 };
            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_tile_metrics(expected_metrics, Version, new base_metric_header());
            c_csharp_comm.read_interop_from_buffer(expected_binary_data, (uint)expected_binary_data.Length, actual_metric_set);
        }
コード例 #7
0
ファイル: TileMetricsTest.cs プロジェクト: Illumina/interop
		protected void SetUp()
		{

		    read_metric_vector read1 = new read_metric_vector();
		    read1.Add(new read_metric(1, 2.61630869f, 0.0797112584f, 0.119908921f));
			expected_metrics.Add(new tile_metric(7, 1114, 2355119.25f,1158081.50f,6470949,3181956, read1));
		    read_metric_vector read2 = new read_metric_vector();
		    read2.Add(new read_metric(1, 2.62243795f, 0.129267812f, 0.135128692f));
			expected_metrics.Add(new tile_metric(7, 1214, 2355119.25f,1174757.75f,6470949,3227776, read2));
		    read_metric_vector read3 = new read_metric_vector();
		    read3.Add(new read_metric(1, 2.490309f, 0.11908555f, 0.092706576f));
			expected_metrics.Add(new tile_metric(7, 2114, 2355119.25f,1211592.38f,6470949,3328983, read3));

			int[] tmp = new int[]{2,10
            ,7,0,90,4,100,0,-67,-66,15,74
            ,7,0,90,4,102,0,74,122,-59,74
            ,7,0,90,4,101,0,12,94,-115,73
            ,7,0,90,4,103,0,16,54,66,74
            ,7,0,90,4,-56,0,82,-11,80,58
            ,7,0,90,4,-55,0,-62,42,-99,58
            ,7,0,90,4,44,1,-102,113,39,64
            ,7,0,-66,4,100,0,-67,-66,15,74
            ,7,0,-66,4,102,0,74,122,-59,74
            ,7,0,-66,4,101,0,46,103,-113,73
            ,7,0,-66,4,103,0,0,2,69,74
            ,7,0,-66,4,-56,0,21,111,-87,58
            ,7,0,-66,4,-55,0,-86,29,-79,58
            ,7,0,-66,4,44,1,6,-42,39,64
            ,7,0,66,8,100,0,-67,-66,15,74
            ,7,0,66,8,102,0,74,122,-59,74
            ,7,0,66,8,101,0,67,-26,-109,73
            ,7,0,66,8,103,0,92,47,75,74
            ,7,0,66,8,-56,0,123,22,-100,58
            ,7,0,66,8,-55,0,85,6,115,58
            ,7,0,66,8,44,1,57,97,31,64
			};
			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_tile_metrics(expected_metrics, Version, new base_metric_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();
		}
コード例 #8
0
 public static int ReadInterop(string filename, base_tile_metrics tile_metric_set)
 {
     try
     {
         c_csharp_comm.read_interop(filename, tile_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);
 }
コード例 #9
0
ファイル: Example2.cs プロジェクト: Illumina/interop
	public static int ReadInterop(string filename, base_tile_metrics tile_metric_set)
	{
		try
		{
			c_csharp_comm.read_interop (filename, tile_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;
	}
コード例 #10
0
    static int Main(string[] args)
    {
        if (args.Length != 1)
        {
            if (args.Length < 1)
            {
                Console.WriteLine("No run folder");
            }
            else
            {
                Console.WriteLine("Too many arguments");
            }
            return(1);
        }


        base_tile_metrics tile_metric_set = new base_tile_metrics();

        try
        {
            c_csharp_comm.read_interop(args [0], tile_metric_set);
        }
        catch (incomplete_file_exception) {}
        catch (file_not_found_exception ex)
        {
            Console.WriteLine("File not found: " + args [0]);
            Console.WriteLine(ex);
            return(1);
        }
        catch (bad_format_exception ex)
        {
            Console.WriteLine(ex);
            return(1);
        }
        Console.Write("Tile metric set contains {0} metrics", tile_metric_set.size());
        return(0);
    }
コード例 #11
0
    static int Main(string[] args)
    {
        int ret;

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

        base_tile_metrics tile_metric_set = new base_tile_metrics();

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

        Dictionary <uint, TileSummary> lane_summary_map = new Dictionary <uint, TileSummary>();

        foreach (var metric in tile_metric_set.metrics())
        {
            if (!lane_summary_map.ContainsKey(metric.lane()))
            {
                lane_summary_map.Add(metric.lane(), new TileSummary());
            }
            lane_summary_map[metric.lane()].cluster_count    += metric.clusterCount();
            lane_summary_map[metric.lane()].cluster_count_pf += metric.clusterCountPf();
            lane_summary_map[metric.lane()].tile_count       += 1;
        }
        foreach (KeyValuePair <uint, TileSummary> pair in lane_summary_map)
        {
            Console.WriteLine("Lane: {0}", pair.Key);
            Console.WriteLine("Tiles: {0}", pair.Value.tile_count);
            Console.WriteLine("Cluster PF (%): {0}", pair.Value.cluster_count_pf / pair.Value.cluster_count * 100);
        }

        return(0);
    }
コード例 #12
0
ファイル: CoreTests.cs プロジェクト: mszhanghm/interop
        public void TestTileMetricsIndexOutOfBoundsException()
        {
            base_tile_metrics summary = new base_tile_metrics();

            System.Console.WriteLine(summary.at(0u));
        }
コード例 #13
0
        public base_tile_metrics tile_metric_set()
        {
            base_tile_metrics ret = new base_tile_metrics(c_csharp_run_metricsPINVOKE.run_metrics_tile_metric_set(swigCPtr), false);

            return(ret);
        }