/** * Efficient caching accessor that returns the GATK NGSPlatform of this read * @return */ public NGSPlatform getNGSPlatform() { return getReadGroup().getNGSPlatform(); }
/** * Convenience get -- get the NGSPlatform from a GATKSAMRecord. * * Just gets the platform from the GATKReadGroupRecord associated with this read. * * @param read a non-null GATKSAMRecord * @return an NGSPlatform object matching the PL field of the header, of UNKNOWN if there was no match, * if there is no read group for read, or there's no PL field for the read group */ public static NGSPlatform fromRead(final GATKSAMRecord read) { if ( read == null ) throw new IllegalArgumentException("read cannot be null"); final GATKSAMReadGroupRecord rg = read.getReadGroup(); return rg == null ? UNKNOWN : rg.getNGSPlatform(); }