Package org.molgenis.util.plink.datatypes

Examples of org.molgenis.util.plink.datatypes.Biallele


  @Test
  public void writeIterableTpedEntry() throws IOException
  {
    List<TpedEntry> entryList = new ArrayList<TpedEntry>();
    Biallele b0_1 = new Biallele('A', 'A');
    Biallele b0_2 = new Biallele('A', 'C');
    Biallele b0_3 = new Biallele('C', 'C');
    Biallele b0_4 = new Biallele('A', 'C');
    Biallele b0_5 = new Biallele('C', 'C');
    Biallele b0_6 = new Biallele('C', 'C');
    entryList.add(new TpedEntry("1", "snp1", 0.0, 5000650, Arrays.asList(b0_1, b0_2, b0_3, b0_4, b0_5, b0_6)));
    Biallele b1_1 = new Biallele('G', 'T');
    Biallele b1_2 = new Biallele('G', 'T');
    Biallele b1_3 = new Biallele('G', 'G');
    Biallele b1_4 = new Biallele('T', 'T');
    Biallele b1_5 = new Biallele('G', 'T');
    Biallele b1_6 = new Biallele('T', 'T');
    entryList.add(new TpedEntry("1", "snp2", 0.0, 5000830, Arrays.asList(b1_1, b1_2, b1_3, b1_4, b1_5, b1_6)));

    File file0 = File.createTempFile("TpedFileWriterTest_file0", null);
    try
    {
View Full Code Here


    {
      PedFileWriter fileWriter = null;
      try
      {
        fileWriter = new PedFileWriter(file0);
        fileWriter.write(new PedEntry("1", "1", "0", "0", (byte) 1, 1.0, Arrays.asList(new Biallele('A', 'A'),
            new Biallele('G', 'T'))));
      }
      finally
      {
        IOUtils.closeQuietly(fileWriter);
      }
View Full Code Here

  @Test
  public void writeIterablePedEntry() throws IOException
  {
    List<PedEntry> entryList = new ArrayList<PedEntry>();
    entryList.add(new PedEntry("1", "1", "0", "0", (byte) 1, 1.0, Arrays.asList(new Biallele('A', 'A'),
        new Biallele('G', 'T'))));
    entryList.add(new PedEntry("2", "1", "0", "0", (byte) 1, 1.0, Arrays.asList(new Biallele('A', 'C'),
        new Biallele('T', 'G'))));

    File file0 = File.createTempFile("PedFileWriterTest_file0", null);
    try
    {
      PedFileWriter fileWriter = null;
View Full Code Here

    {
      BimFileWriter fileWriter = null;
      try
      {
        fileWriter = new BimFileWriter(file0);
        fileWriter.write(new BimEntry("1", "snp1", 0.0, 1, new Biallele('A', 'C')));
      }
      finally
      {
        IOUtils.closeQuietly(fileWriter);
      }
View Full Code Here

  @Test
  public void writeIterableBimEntry() throws IOException
  {
    List<BimEntry> entryList = new ArrayList<BimEntry>();
    entryList.add(new BimEntry("1", "snp1", 0.0, 1, new Biallele('A', 'C')));
    entryList.add(new BimEntry("2", "snp2", 1.2, 1, new Biallele('C', 'A')));

    File file0 = File.createTempFile("BimFileWriterTest_file0", null);
    try
    {
      BimFileWriter fileWriter = null;
View Full Code Here

    {
      TpedFileWriter fileWriter = null;
      try
      {
        fileWriter = new TpedFileWriter(file0);
        Biallele b1 = new Biallele('A', 'A');
        Biallele b2 = new Biallele('A', 'C');
        Biallele b3 = new Biallele('C', 'C');
        Biallele b4 = new Biallele('A', 'C');
        Biallele b5 = new Biallele('C', 'C');
        Biallele b6 = new Biallele('C', 'C');
        fileWriter.write(new TpedEntry("1", "snp1", 0.0, 5000650, Arrays.asList(b1, b2, b3, b4, b5, b6)));
      }
      finally
      {
        IOUtils.closeQuietly(fileWriter);
View Full Code Here

TOP

Related Classes of org.molgenis.util.plink.datatypes.Biallele

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.