private void loadSMAPFile(ResourceLocator locator, List<Track> newTracks, Genome genome) throws IOException { List<Feature> features = SMAPParser.parseFeatures(locator, genome); FeatureCollectionSource src = new FeatureCollectionSource(features, genome); FeatureTrack track = new FeatureTrack(locator, locator.getName(), src); track.setRendererClass(SMAPRenderer.class); track.setDisplayMode(Track.DisplayMode.EXPANDED); newTracks.add(track); }
private void loadDASResource(ResourceLocator locator, List<Track> currentTracks) throws DataLoadException { // TODO Connect and get all the attributes of the DAS server, and run the appropriate load // statements // TODO Currently we are only going to be doing features // TODO -- move the source creation to a factory DASFeatureSource featureSource = null; try { featureSource = new DASFeatureSource(locator); } catch (MalformedURLException e) { log.error("Malformed URL", e); throw new DataLoadException("Error: Malformed URL "); } FeatureTrack track = new FeatureTrack(locator, featureSource); // Try to create a sensible name from the path String name = locator.getName(); if (name == null || name.length() == 0) { if (locator.getPath().contains("genome.ucsc.edu")) { name = featureSource.getType(); } else { name = featureSource.getPath().replace("/das/", "").replace("/features", ""); } } track.setName(name); // A hack until we can notate this some other way if (locator.getPath().contains("cosmic")) { track.setRendererClass(CosmicFeatureRenderer.class); track.setMinimumHeight(2); track.setHeight(20); track.setDisplayMode(Track.DisplayMode.EXPANDED); } else { track.setRendererClass(IGVFeatureRenderer.class); track.setMinimumHeight(35); track.setHeight(45); } currentTracks.add(track); }
/** * Load a mutation file (".mut" or ".maf"). * * @param locator * @param newTracks */ private void loadMutFile(ResourceLocator locator, List<Track> newTracks, Genome genome) throws IOException, TribbleIndexNotFoundException { MutationTrackLoader loader = new MutationTrackLoader(); List<FeatureTrack> mutationTracks = loader.loadMutationTracks(locator, genome); for (FeatureTrack track : mutationTracks) { track.setTrackType(TrackType.MUTATION); track.setRendererClass(MutationRenderer.class); newTracks.add(track); } }