GItLab steht Donnerstag zwischen 12:30 und 14:30 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit 9e7df2af authored by Michael Menzel's avatar Michael Menzel

create some distance tracks

parent 1151e219
......@@ -96,7 +96,7 @@ public class DBConnector {
TrackEntry entry = new TrackEntry(rs.getString("name"),
rs.getString("description"),
rs.getString("directory") + "/" + rs.getString("bed_filename"),
(rs.getString("category").contains("Scored") ? "scored" : "inout"),
(rs.getString("category").contains("Scored") ? "scored" : rs.getString("category").contains("distance") ? "distance" : "inout"),
rs.getString("genome_assembly"),
rs.getString("cell_line"),
rs.getInt("lines"),
......
......@@ -112,8 +112,8 @@ public final class TrackFactory {
if (System.getenv("HOME").contains("menzel")) {
allTracks = connector.getAllTracks("WHERE name like '%ontigs'");
/*
allTracks = connector.getAllTracks(" WHERE directory like '%genetic%' and genome_assembly = 'hg19' ORDER BY lines ASC ");
/*
allTracks.addAll(connector.getAllTracks("WHERE genome_assembly = 'hg19' and directory like '%encode%HeLa%'"));
allTracks.addAll(connector.getAllTracks("WHERE genome_assembly = 'hg19' and directory like '%custom%'"));
//allTracks = connector.getAllTracks("WHERE bed_filename = 'SRX062365.05.bed'");
......@@ -121,7 +121,8 @@ public final class TrackFactory {
*/
} else {
allTracks = connector.getAllTracks("WHERE (cell_line NOT like '%GM%' or cell_line like '%GM12878')");
//allTracks = connector.getAllTracks("WHERE (cell_line NOT like '%GM%' or cell_line like '%GM12878' or name like '%POLR%')");
allTracks = connector.getAllTracks("WHERE (name not like '%POLR%' or name not like '%expression%')");
/*
allTracks = connector.getAllTracks(" WHERE directory like '%genetic%' and genome_assembly = 'hg19' ORDER BY lines ASC ");
allTracks.addAll(connector.getAllTracks("WHERE cell_line like 'HeLa%'"));
......@@ -157,6 +158,8 @@ public final class TrackFactory {
customTracks.forEach(e -> trackEntries.put(e.getName(), e));
this.tracks.addAll(loadByEntries(customTracks));
tracks.add(Tracks.createDistFromInOut(getTrackById(1386)));
tracks.add(Tracks.createDistFromInOut(getTrackById(1376)));
//TODO use DB:
List<String> trackPackagesNames = new ArrayList<>();
......
......@@ -497,14 +497,14 @@ public final class Tracks {
return TrackFactory.getInstance().createInOutTrack(start, end, track.getName() + " as inout ", track.getDescription(), track.getAssembly());
}
public static DistanceTrack createDistFromInOut(InOutTrack track) {
public static DistanceTrack createDistFromInOut(Track track) {
List<Long> midpoints = IntStream.range(0, track.getStarts().length)
.mapToLong(p -> track.getEnds()[p] - track.getStarts()[p])
.boxed()
.collect(Collectors.toList());
return TrackFactory.getInstance().createDistanceTrack(midpoints, "Distance from " + track.getName(), "Distance from " + track.getName(), Genome.Assembly.hg19, track.getCellLine());
return TrackFactory.getInstance().createDistanceTrack(midpoints, "Distance from " + track.getName(), "Distance from " + track.getName(), track.getAssembly(), track.getCellLine());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment