public boolean isBigWigFile() { return fileHeader.isBigWig(); }
public boolean isBigWigFile() { return fileHeader.isBigWig(); }
public boolean isBigWigFile() { return fileHeader.isBigWig(); }
public void print() { if (isHeaderOK) { if (isBigWig()) System.out.println("BigWig file " + path + ", file header at location " + fileHeaderOffset); else if (isBigBed()) System.out.println("BigBed file " + path + ", file header at location " + fileHeaderOffset); } else { System.out.println("BBFile " + path + " with bad magic = " + magic + " from file header location " + fileHeaderOffset); return; // bad read - remaining header items not interpreted } // header fields System.out.println("BBFile header magic = " + magic); System.out.println("Version = " + version); System.out.println("Zoom Levels = " + nZoomLevels); System.out.println("Chromosome Info B+ tree offset = " + chromTreeOffset); System.out.println("Data Block offset = " + fullDataOffset); System.out.println("Chromosome Data R+ tree offset = " + fullIndexOffset); System.out.println("Bed fields count = " + fieldCount); System.out.println("Bed defined fields count = " + definedFieldCount); System.out.println("AutoSql Offset = " + autoSqlOffset); System.out.println("Total Summary offset = " + totalSummaryOffset); System.out.println("Maximum uncompressed buffer size = " + uncompressBuffSize); System.out.println("m_reserved = " + reserved); }
public void print() { if (isHeaderOK) { if (isBigWig()) System.out.println("BigWig file " + path + ", file header at location " + fileHeaderOffset); else if (isBigBed()) System.out.println("BigBed file " + path + ", file header at location " + fileHeaderOffset); } else { System.out.println("BBFile " + path + " with bad magic = " + magic + " from file header location " + fileHeaderOffset); return; // bad read - remaining header items not interpreted } // header fields System.out.println("BBFile header magic = " + magic); System.out.println("Version = " + version); System.out.println("Zoom Levels = " + nZoomLevels); System.out.println("Chromosome Info B+ tree offset = " + chromTreeOffset); System.out.println("Data Block offset = " + fullDataOffset); System.out.println("Chromosome Data R+ tree offset = " + fullIndexOffset); System.out.println("Bed fields count = " + fieldCount); System.out.println("Bed defined fields count = " + definedFieldCount); System.out.println("AutoSql Offset = " + autoSqlOffset); System.out.println("Total Summary offset = " + totalSummaryOffset); System.out.println("Maximum uncompressed buffer size = " + uncompressBuffSize); System.out.println("m_reserved = " + reserved); }
public void print() { if (isHeaderOK) { if (isBigWig()) System.out.println("BigWig file " + path + ", file header at location " + fileHeaderOffset); else if (isBigBed()) System.out.println("BigBed file " + path + ", file header at location " + fileHeaderOffset); } else { System.out.println("BBFile " + path + " with bad magic = " + magic + " from file header location " + fileHeaderOffset); return; // bad read - remaining header items not interpreted } // header fields System.out.println("BBFile header magic = " + magic); System.out.println("Version = " + version); System.out.println("Zoom Levels = " + nZoomLevels); System.out.println("Chromosome Info B+ tree offset = " + chromTreeOffset); System.out.println("Data Block offset = " + fullDataOffset); System.out.println("Chromosome Data R+ tree offset = " + fullIndexOffset); System.out.println("Bed fields count = " + fieldCount); System.out.println("Bed defined fields count = " + definedFieldCount); System.out.println("AutoSql Offset = " + autoSqlOffset); System.out.println("Total Summary offset = " + totalSummaryOffset); System.out.println("Maximum uncompressed buffer size = " + uncompressBuffSize); System.out.println("m_reserved = " + reserved); }
if (isBigWig() || isBigBed()) this.isHeaderOK = true;
if (isBigWig() || isBigBed()) this.isHeaderOK = true;
/** * Read bigWig from local file or remote URL. * @param filename Filename or URL to access * @param gc Query coordinates and size of printable window * @throws IOException * @throws InvalidRecordException * @throws InvalidGenomicCoordsException * @throws SQLException * @throws ClassNotFoundException */ public TrackWiggles(String filename, GenomicCoords gc, int bdgDataColIdx) throws IOException, InvalidRecordException, InvalidGenomicCoordsException, ClassNotFoundException, SQLException{ this.setFilename(filename); this.setWorkFilename(filename); this.bdgDataColIdx= bdgDataColIdx; this.setTrackFormat(Utils.getFileTypeFromName(this.getWorkFilename())); if(this.getTrackFormat().equals(TrackFormat.BIGWIG)){ this.setTrackFormat(TrackFormat.BIGWIG); this.bigWigReader=new BBFileReader(this.getWorkFilename()); // or url for remote access. if(!this.bigWigReader.getBBFileHeader().isBigWig()){ throw new RuntimeException("Invalid file type " + this.getWorkFilename()); } } else if(this.getTrackFormat().equals(TrackFormat.BEDGRAPH) && ! Utils.hasTabixIndex(filename)){ String tabixBdg= this.tabixBedgraphToTmpFile(filename); this.setWorkFilename(tabixBdg); } this.setGc(gc); };