Package gem.parser

Examples of gem.parser.TabDelimitedFileParser


 
 
  public static void writeLeukemiaIndexes() throws Throwable
  {
    TabDelimitedFileParser parser = new TabDelimitedFileParser("resource/celltypes_expO.txt");
    Set<String> expoSet = parser.getColumnSet("Accession");

    List<String> bigList = new ArrayList<String>();
    BufferedReader reader = new BufferedReader(new FileReader("resource/expdata/bigdata/1/mas5calls.txt"));
    bigList.addAll(Arrays.asList(reader.readLine().split("\t")));
    reader = new BufferedReader(new FileReader("resource/expdata/bigdata/2/mas5calls.txt"));
View Full Code Here


    return groups;
  }

  private static void filterToAndrRespTars(List<Group> groups)
  {
    TabDelimitedFileParser p = new TabDelimitedFileParser("resource/factors/AR_andr.txt");
    Set<String> tars = p.getColumnSet("Target");
    Iterator<Group> iter = groups.iterator();
    while (iter.hasNext())
    {
      Group g = iter.next();
      if (!tars.contains(g.tar)) iter.remove();
View Full Code Here

      "\t" + pv);
  }

  private static void assignAndrResponse(List<Group> groups)
  {
    TabDelimitedFileParser parser = new TabDelimitedFileParser("resource/factors/AR_andr.txt");
    Map<String, String> score = parser.getOneToOneMap("Target", "Score");

    int same = 0;
    int oppo = 0;
    for (Group g : groups)
    {
View Full Code Here

  {
    String facName = "AR";

    boolean[] norPos = getNormalMixInExpop();

    TabDelimitedFileParser parser = new TabDelimitedFileParser(
      "resource/factors/" + facName + ".txt");
    Set<String> tarSymbs = parser.getColumnSet(0);
    System.out.println("tarSymbs = " + tarSymbs.size());

    Map<String, String> s2g = Triplet.getSymbolToGeneMap();

    Set<String> tars = new HashSet<String>();
View Full Code Here

  }

  public static List<String> getExpoTissues(int minCount) throws Throwable
  {
    TermCounter tc = new TermCounter();
    TabDelimitedFileParser parser = new TabDelimitedFileParser("resource/celltypes_expO.txt");
    Map<String, String> map = parser.getOneToOneMap("Sample", "Tissue");

    for (String cell : map.values())
    {
      cell = cell.toLowerCase();
      tc.addTerm(cell);
View Full Code Here

    }
  }

  public static void printTissuesAsStages()
  {
    TabDelimitedFileParser parser = new TabDelimitedFileParser("resource/celltypes_expO.txt");
    Map<String, Set<String>> map = parser.getOneToManyMap("Tissue", "Sample");
    for (String tiss : map.keySet())
    {
      Set<String> samples = map.get(tiss);

      if (samples.size() >= 50)
View Full Code Here

    }
  }

  public static String[] getExpoTissueNamesArray() throws IOException
  {
    TabDelimitedFileParser p = new TabDelimitedFileParser("resource/celltypes_expO.txt");
    Map<String, String> map = p.getOneToOneMap("Sample", "Tissue");
    String[] cols = FileUtil.getColumnsArray("resource/expdata/expo/expnames.txt");
    String[] names = new String[cols.length];
    for (int i = 0; i < names.length; i++)
    {
      names[i] = map.get(cols[i]);
View Full Code Here

  }


  public static void writePresenceMatrix() throws Throwable
  {
    TabDelimitedFileParser parser = new TabDelimitedFileParser("resource/ChEA_facs.txt");
    Set<String> names = parser.getColumnSet(0);
    Set<String> ids = new HashSet<String>();

    names.add("FOXA1");
    Map<String, String> s2g = Triplet.getSymbolToGeneMap();
View Full Code Here

  public static boolean[] getPositionsOfNames(String allNamesFile, String selectNamesFile)
  {
    List<String> expnames = readSampleNames(allNamesFile);

    TabDelimitedFileParser parser = new TabDelimitedFileParser(selectNamesFile);
    Set<String> select = parser.getColumnSet(0);

    boolean[] hit = new boolean[expnames.size()];

    int i = 0;
    for (String exp : expnames)
View Full Code Here

    return hit;
  }

  public static boolean[] getPositionsOfNames(List<String> expnames, String selectNamesFile, String column)
  {
    TabDelimitedFileParser parser = new TabDelimitedFileParser(selectNamesFile);
    Set<String> select = parser.getColumnSet(column);

    boolean[] hit = new boolean[expnames.size()];

    int i = 0;
    for (String exp : expnames)
View Full Code Here

TOP

Related Classes of gem.parser.TabDelimitedFileParser

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.