Search in sources :

Example 1 with TDFGroup

use of org.broad.igv.tdf.TDFGroup in project ASCIIGenome by dariober.

the class TrackWiggles method getAttributesFromTDF.

private String getAttributesFromTDF(String attr) {
    String path = this.getWorkFilename();
    try {
        ResourceLocator resourceLocator = new ResourceLocator(path);
        TDFReader reader = new TDFReader(resourceLocator);
        TDFGroup rootGroup = reader.getGroup("/");
        return rootGroup.getAttribute(attr);
    } catch (Exception e) {
        return null;
    }
}
Also used : TDFGroup(org.broad.igv.tdf.TDFGroup) TDFReader(org.broad.igv.tdf.TDFReader) InvalidColourException(exceptions.InvalidColourException) InvalidRecordException(exceptions.InvalidRecordException) SQLException(java.sql.SQLException) IOException(java.io.IOException) InvalidGenomicCoordsException(exceptions.InvalidGenomicCoordsException) ResourceLocator(org.broad.igv.util.ResourceLocator)

Aggregations

InvalidColourException (exceptions.InvalidColourException)1 InvalidGenomicCoordsException (exceptions.InvalidGenomicCoordsException)1 InvalidRecordException (exceptions.InvalidRecordException)1 IOException (java.io.IOException)1 SQLException (java.sql.SQLException)1 TDFGroup (org.broad.igv.tdf.TDFGroup)1 TDFReader (org.broad.igv.tdf.TDFReader)1 ResourceLocator (org.broad.igv.util.ResourceLocator)1