public String getLibrary() { return readGroupRecord == null ? null : readGroupRecord.getLibrary(); } }
public static String getReadGroupLibraryName(final SAMReadGroupRecord readGroup) { return Optional.ofNullable(readGroup.getLibrary()) .orElse(UNKNOWN_LIBRARY); }
public static String getReadGroupLibraryName(final SAMReadGroupRecord readGroup) { return Optional.ofNullable(readGroup.getLibrary()) .orElse(UNKNOWN_LIBRARY); }
public boolean filterOut( final SAMRecord read ) { final SAMReadGroupRecord readGroup = read.getReadGroup(); return ( readGroup == null || readGroup.getLibrary() == null || !readGroup.getLibrary().equals( LIBRARY_TO_KEEP ) ); } }
public SAMRecordDuplicateComparator(final List<SAMFileHeader> headers) { // pre-populate the library names for (final SAMFileHeader header : headers) { for (final SAMReadGroupRecord readGroup : header.getReadGroups()) { final String libraryName = readGroup.getLibrary(); if (null != libraryName) { final short libraryId = this.nextLibraryId++; this.libraryIds.put(libraryName, libraryId); } } } }
public SAMRecordDuplicateComparator(final List<SAMFileHeader> headers) { // pre-populate the library names for (final SAMFileHeader header : headers) { for (final SAMReadGroupRecord readGroup : header.getReadGroups()) { final String libraryName = readGroup.getLibrary(); if (null != libraryName) { final short libraryId = this.nextLibraryId++; this.libraryIds.put(libraryName, libraryId); } } } }
@Override protected void setup(final SAMFileHeader header, final File samFile) { IOUtil.assertFileIsWritable(OUTPUT); IOUtil.assertFileIsWritable(CHART_OUTPUT); // If we're working with a single library, assign that library's name // as a suffix to the plot title final List<SAMReadGroupRecord> readGroups = header.getReadGroups(); if (readGroups.size() == 1) { this.plotSubtitle = readGroups.get(0).getLibrary(); if (null == this.plotSubtitle) this.plotSubtitle = ""; } }
@Override protected void setup(final SAMFileHeader header, final File samFile) { IOUtil.assertFileIsWritable(OUTPUT); IOUtil.assertFileIsWritable(CHART_OUTPUT); // If we're working with a single library, assign that library's name // as a suffix to the plot title final List<SAMReadGroupRecord> readGroups = header.getReadGroups(); if (readGroups.size() == 1) { this.plotSubtitle = readGroups.get(0).getLibrary(); if (null == this.plotSubtitle) this.plotSubtitle = ""; } }
public FingerprintIdDetails(final SAMReadGroupRecord rg, final String file) { this(rg.getPlatformUnit(), file); this.sample = rg.getSample(); this.library = rg.getLibrary(); }
@Override protected void setup(final SAMFileHeader header, final File samFile) { IOUtil.assertFileIsWritable(CHART_OUTPUT); // If we're working with a single library, assign that library's name // as a suffix to the plot title final List<SAMReadGroupRecord> readGroups = header.getReadGroups(); if (readGroups.size() == 1) { plotSubtitle = StringUtil.asEmptyIfNull(readGroups.get(0).getLibrary()); } }
public FingerprintIdDetails(final SAMReadGroupRecord rg, final String file) { this(rg.getPlatformUnit(), file); this.sample = rg.getSample(); this.library = rg.getLibrary(); }
protected PerUnitMetricCollector<METRIC_TYPE, Histogram_KEY, ARGTYPE> makeLibraryCollector(final SAMReadGroupRecord rg) { return makeChildCollector(rg.getSample(), rg.getLibrary(), null); } protected PerUnitMetricCollector<METRIC_TYPE, Histogram_KEY, ARGTYPE> makeReadGroupCollector(final SAMReadGroupRecord rg) {
@Override protected void setup(final SAMFileHeader header, final File samFile) { IOUtil.assertFileIsWritable(CHART_OUTPUT); // If we're working with a single library, assign that library's name // as a suffix to the plot title final List<SAMReadGroupRecord> readGroups = header.getReadGroups(); if (readGroups.size() == 1) { plotSubtitle = StringUtil.asEmptyIfNull(readGroups.get(0).getLibrary()); } }
protected PerUnitMetricCollector<METRIC_TYPE, Histogram_KEY, ARGTYPE> makeLibraryCollector(final SAMReadGroupRecord rg) { return makeChildCollector(rg.getSample(), rg.getLibrary(), null); } protected PerUnitMetricCollector<METRIC_TYPE, Histogram_KEY, ARGTYPE> makeReadGroupCollector(final SAMReadGroupRecord rg) {
@Override protected void setup(final SAMFileHeader header, final File samFile) { IOUtil.assertFileIsWritable(CHART_OUTPUT); final List<SAMReadGroupRecord> readGroups = header.getReadGroups(); if (readGroups.size() == 1) { plotSubtitle = StringUtil.asEmptyIfNull(readGroups.get(0).getLibrary()); } hist = new HistogramGenerator(); }
@Override protected void setup(final SAMFileHeader header, final File samFile) { IOUtil.assertFileIsWritable(CHART_OUTPUT); final List<SAMReadGroupRecord> readGroups = header.getReadGroups(); if (readGroups.size() == 1) { plotSubtitle = StringUtil.asEmptyIfNull(readGroups.get(0).getLibrary()); } hist = new HistogramGenerator(); }
protected PerUnitMetricCollector<METRIC_TYPE, Histogram_KEY, ARGTYPE> makeReadGroupCollector(final SAMReadGroupRecord rg) { return makeChildCollector(rg.getSample(), rg.getLibrary(), rg.getPlatformUnit()); }
protected PerUnitMetricCollector<METRIC_TYPE, Histogram_KEY, ARGTYPE> makeReadGroupCollector(final SAMReadGroupRecord rg) { return makeChildCollector(rg.getSample(), rg.getLibrary(), rg.getPlatformUnit()); }
@Override public void acceptRecord(final TestArg args) { numProcessed += 1; metric.TALLY += 1; if(metric.SAMPLE != null) { Assert.assertEquals(metric.SAMPLE, args.samRecord.getReadGroup().getSample()); } if(metric.LIBRARY != null) { Assert.assertEquals(metric.LIBRARY, args.samRecord.getReadGroup().getLibrary()); } if(metric.READ_GROUP != null) { Assert.assertEquals(metric.READ_GROUP, args.samRecord.getReadGroup().getPlatformUnit()); } }
private boolean compareReadGroup(final SAMReadGroupRecord samReadGroupRecord1, final SAMReadGroupRecord samReadGroupRecord2) { boolean ret = compareValues(samReadGroupRecord1.getReadGroupId(), samReadGroupRecord2.getReadGroupId(), "Read Group ID"); ret = compareValues(samReadGroupRecord1.getSample(), samReadGroupRecord2.getSample(), "Sample for read group " + samReadGroupRecord1.getReadGroupId()) && ret; ret = compareValues(samReadGroupRecord1.getLibrary(), samReadGroupRecord2.getLibrary(), "Library for read group " + samReadGroupRecord1.getReadGroupId()) && ret; final String[] attributes = {"DS", "PU", "PI", "CN", "DT", "PL"}; for (final String attribute : attributes) { ret = compareValues(samReadGroupRecord1.getAttribute(attribute), samReadGroupRecord2.getAttribute(attribute), attribute + " for read group " + samReadGroupRecord1.getReadGroupId()) && ret; } return ret; }