Beispiel #1
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;
	}
        public void TestHardCodedBinaryData()
        {
            Assert.AreEqual(expected_metric_set.version(), actual_metric_set.version());
            Assert.AreEqual(expected_metric_set.size(), actual_metric_set.size());

            for (uint i = 0; i < Math.Min(expected_metric_set.size(), actual_metric_set.size()); i++)
            {
                Assert.AreEqual(expected_metric_set.at(i).lane(), actual_metric_set.at(i).lane());
                Assert.AreEqual(expected_metric_set.at(i).tile(), actual_metric_set.at(i).tile());
                Assert.AreEqual(expected_metric_set.at(i).clusterDensity(), actual_metric_set.at(i).clusterDensity());
                Assert.AreEqual(expected_metric_set.at(i).clusterDensityPf(), actual_metric_set.at(i).clusterDensityPf());
                Assert.AreEqual(expected_metric_set.at(i).clusterCount(), actual_metric_set.at(i).clusterCount());
                Assert.AreEqual(expected_metric_set.at(i).clusterCountPf(), actual_metric_set.at(i).clusterCountPf());
                Assert.AreEqual(expected_metric_set.at(i).read_metrics().Count, actual_metric_set.at(i).read_metrics().Count);
                for (int j = 0; j < Math.Min(expected_metric_set.at(i).read_metrics().Count, actual_metric_set.at(i).read_metrics().Count); j++)
                {
                    Assert.AreEqual(expected_metric_set.at(i).read_metrics()[j].read(), actual_metric_set.at(i).read_metrics()[j].read());
                    Assert.AreEqual(expected_metric_set.at(i).read_metrics()[j].percent_aligned(), actual_metric_set.at(i).read_metrics()[j].percent_aligned(), 1e-7);
                    Assert.AreEqual(expected_metric_set.at(i).read_metrics()[j].percent_phasing(), actual_metric_set.at(i).read_metrics()[j].percent_phasing(), 1e-7);
                    Assert.AreEqual(expected_metric_set.at(i).read_metrics()[j].percent_prephasing(), actual_metric_set.at(i).read_metrics()[j].percent_prephasing(), 1e-7);
                }
            }
        }
Beispiel #3
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);
    }