Esempio n. 1
0
  /**
   * Add the provided SegmentedDataSet to the list of tracks, set other relevant properties
   *
   * @param locator
   * @param newTracks
   * @param genome
   * @param ds
   */
  private void loadSegTrack(
      ResourceLocator locator, List<Track> newTracks, Genome genome, SegmentedDataSet ds) {
    String path = locator.getPath();

    TrackProperties props = null;
    if (ds instanceof SegmentedAsciiDataSet) {
      props = ((SegmentedAsciiDataSet) ds).getTrackProperties();
    }

    // The "freq" track.  TODO - make this optional
    if ((ds.getType() == TrackType.COPY_NUMBER || ds.getType() == TrackType.CNV)
        && ds.getSampleNames().size() > 1) {
      FreqData fd = new FreqData(ds, genome);
      String freqTrackId = path;
      String freqTrackName = "CNV Summary";
      CNFreqTrack freqTrack = new CNFreqTrack(locator, freqTrackId, freqTrackName, fd);
      newTracks.add(freqTrack);
    }

    for (String trackName : ds.getSampleNames()) {
      String trackId = path + "_" + trackName;
      SegmentedDataSource dataSource = new SegmentedDataSource(trackName, ds);
      DataSourceTrack track = new DataSourceTrack(locator, trackId, trackName, dataSource);
      track.setRendererClass(HeatmapRenderer.class);
      track.setTrackType(ds.getType());

      if (props != null) {
        track.setProperties(props);
      }

      newTracks.add(track);
    }
  }
Esempio n. 2
0
  private List<LocusScore> getSegments(String chr) {

    return dataset.getSegments(trackIdentifier, chr);
  }
Esempio n. 3
0
 public double getDataMin() {
   return dataset.getDataMin(Globals.CHR_ALL);
 }
Esempio n. 4
0
 public boolean isLogNormalized() {
   return dataset.isLogNormalized();
 }
Esempio n. 5
0
 public TrackType getTrackType() {
   return dataset.getType();
 }
Esempio n. 6
0
 public List<LocusScore> getWholeGenomeScores() {
   return dataset.getWholeGenomeScores(trackIdentifier);
 }