Stabilized NGSPlatform code: don't assume all reads have read groups (e.g. artificial SAM records)

This commit is contained in:
Eric Banks 2012-06-06 15:17:30 -04:00
parent 54f682a99c
commit b093ba9dcc
1 changed files with 1 additions and 0 deletions

View File

@ -81,6 +81,7 @@ public enum NGSPlatform {
* @return an NGSPlatform object matching the PL field of the header, of UNKNOWN if there was no match
*/
public static final NGSPlatform fromReadGroup(SAMReadGroupRecord rg) {
if ( rg == null ) return UNKNOWN;
return fromReadGroupPL(rg.getPlatform());
}