private byte[] getReadBasesImpl() { try { if (isAligned) { return getCurrentAlignment().getAlignedFragmentBases().getBytes(); } else { return getCurrentUnalignedRead().getFragmentBases().getBytes(); } } catch (ErrorMsg e) { throw new RuntimeException(e); } }
private byte[] getReadBasesImpl() { try { if (isAligned) { return getCurrentAlignment().getAlignedFragmentBases().getBytes(); } else { return getCurrentUnalignedRead().getFragmentBases().getBytes(); } } catch (ErrorMsg e) { throw new RuntimeException(e); } }
private boolean getReadPairedFlagImpl() { try { if (isAligned) { return getCurrentAlignment().isPaired(); } else { return getCurrentUnalignedRead().getNumFragments() > 1; } } catch (ErrorMsg e) { throw new RuntimeException(e); } }
private boolean getReadPairedFlagImpl() { try { if (isAligned) { return getCurrentAlignment().isPaired(); } else { return getCurrentUnalignedRead().getNumFragments() > 1; } } catch (ErrorMsg e) { throw new RuntimeException(e); } }
private byte[] getBaseQualitiesImpl() { try { Fragment fragment; if (isAligned) { fragment = getCurrentAlignment(); } else { fragment = getCurrentUnalignedRead(); } // quals are being taken from PRIMARY_ALIGNMENT.SAM_QUALITY column which reverse automatically them if needed return SAMUtils.fastqToPhred(fragment.getFragmentQualities()); } catch (ErrorMsg e) { throw new RuntimeException(e); } }
private byte[] getBaseQualitiesImpl() { try { Fragment fragment; if (isAligned) { fragment = getCurrentAlignment(); } else { fragment = getCurrentUnalignedRead(); } // quals are being taken from PRIMARY_ALIGNMENT.SAM_QUALITY column which reverse automatically them if needed return SAMUtils.fastqToPhred(fragment.getFragmentQualities()); } catch (ErrorMsg e) { throw new RuntimeException(e); } }
private boolean getMateUnmappedFlagImpl() { try { if (isAligned) { return !getCurrentAlignment().hasMate(); } else { Read unalignedRead = getCurrentUnalignedRead(); int numFragments = unalignedRead.getNumFragments(); int nextFragmentIdx = unalignedReadFragmentIndex + 1; if (nextFragmentIdx == numFragments) { nextFragmentIdx = 0; } return unalignedRead.fragmentIsAligned(nextFragmentIdx); } } catch (ErrorMsg e) { throw new RuntimeException(e); } }
private String getAttributeGroupNameImpl() { try { String readGroupName; if (isAligned) { readGroupName = getCurrentAlignment().getReadGroup(); } else { readGroupName = getCurrentUnalignedRead().getReadGroup(); } if (!readGroupName.isEmpty()) { return readGroupName; } return getReadCollection().getName(); } catch (ErrorMsg e) { throw new RuntimeException(e); } } }
private String getAttributeGroupNameImpl() { try { String readGroupName; if (isAligned) { readGroupName = getCurrentAlignment().getReadGroup(); } else { readGroupName = getCurrentUnalignedRead().getReadGroup(); } if (!readGroupName.isEmpty()) { return readGroupName; } return getReadCollection().getName(); } catch (ErrorMsg e) { throw new RuntimeException(e); } } }
private boolean getMateUnmappedFlagImpl() { try { if (isAligned) { return !getCurrentAlignment().hasMate(); } else { Read unalignedRead = getCurrentUnalignedRead(); int numFragments = unalignedRead.getNumFragments(); int nextFragmentIdx = unalignedReadFragmentIndex + 1; if (nextFragmentIdx == numFragments) { nextFragmentIdx = 0; } return unalignedRead.fragmentIsAligned(nextFragmentIdx); } } catch (ErrorMsg e) { throw new RuntimeException(e); } }