当前位置: 首页>>代码示例>>Java>>正文


Java SAMReadGroupRecord.getPlatformUnit方法代码示例

本文整理汇总了Java中htsjdk.samtools.SAMReadGroupRecord.getPlatformUnit方法的典型用法代码示例。如果您正苦于以下问题:Java SAMReadGroupRecord.getPlatformUnit方法的具体用法?Java SAMReadGroupRecord.getPlatformUnit怎么用?Java SAMReadGroupRecord.getPlatformUnit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在htsjdk.samtools.SAMReadGroupRecord的用法示例。


在下文中一共展示了SAMReadGroupRecord.getPlatformUnit方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeReadGroupFile

import htsjdk.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
private File makeReadGroupFile(final SAMReadGroupRecord readGroup, final String preExtSuffix) {
    String fileName = null;
    if (RG_TAG.equalsIgnoreCase("PU")){
        fileName = readGroup.getPlatformUnit();
    } else if (RG_TAG.equalsIgnoreCase("ID")){
        fileName = readGroup.getReadGroupId();
    }
    if (fileName == null) {
        throw new PicardException("The selected RG_TAG: "+RG_TAG+" is not present in the bam header.");
    }
    fileName = IOUtil.makeFileNameSafe(fileName);
    if (preExtSuffix != null) fileName += preExtSuffix;
    fileName += COMPRESS_OUTPUTS_PER_RG ? ".fastq.gz" : ".fastq";

    final File result = (OUTPUT_DIR != null)
            ? new File(OUTPUT_DIR, fileName)
            : new File(fileName);
    IOUtil.assertFileIsWritable(result);
    return result;
}
 
开发者ID:broadinstitute,项目名称:picard,代码行数:21,代码来源:SamToFastq.java

示例2: testGetReadGroupWithArguments

import htsjdk.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
@Test
public void testGetReadGroupWithArguments() throws Exception {
    // setting expected RG
    final SAMReadGroupRecord expected = new SAMReadGroupRecord("RGID");
    expected.setProgramGroup("ReadTools");
    expected.setSample("sampleName");
    // setting args
    final ReadGroupArgumentCollection rgargs = new ReadGroupArgumentCollection();

    // starting setting params
    expected.setLibrary("LB");
    rgargs.readGroupLibrary = "LB";

    expected.setPlatform("ILLUMINA");
    rgargs.readGroupPlatform = SAMReadGroupRecord.PlatformValue.ILLUMINA;

    expected.setPlatformUnit("PU");
    rgargs.readGroupPlatformUnit = expected.getPlatformUnit();

    expected.setSequencingCenter("CN");
    rgargs.readGroupSequencingCenter = expected.getSequencingCenter();

    final Iso8601Date date = new Iso8601Date("2007-11-03");
    expected.setRunDate(date);
    rgargs.readGroupRunDate = date;

    expected.setPredictedMedianInsertSize(100);
    rgargs.readGroupPredictedInsertSize = expected.getPredictedMedianInsertSize();

    expected.setPlatformModel("PM");
    rgargs.readGroupPlatformModel = expected.getPlatformModel();

    // testing
    Assert.assertEquals(rgargs
                    .getReadGroupFromArguments(expected.getReadGroupId(), expected.getSample()),
            expected);
}
 
开发者ID:magicDGS,项目名称:ReadTools,代码行数:38,代码来源:ReadGroupArgumentCollectionUnitTest.java

示例3: readGroupValueFromRG

import htsjdk.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
/**
 * If the sample has a PU tag annotation, return that. If not, return the
 * read group id.
 */
private String readGroupValueFromRG(final SAMReadGroupRecord rg) {
	final String platformUnit = rg.getPlatformUnit();
	return platformUnit == null ? rg.getId() : platformUnit;
}
 
开发者ID:BGI-flexlab,项目名称:SOAPgaea,代码行数:9,代码来源:ReadGroupCovariate.java

示例4: FingerprintIdDetails

import htsjdk.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
public FingerprintIdDetails(final SAMReadGroupRecord rg, final String file) {
    this(rg.getPlatformUnit(), file);
    this.sample = rg.getSample();
    this.library = rg.getLibrary();
}
 
开发者ID:broadinstitute,项目名称:picard,代码行数:6,代码来源:FingerprintIdDetails.java

示例5: getKey

import htsjdk.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
@Override
protected String getKey(SAMReadGroupRecord rg) {
    return rg.getPlatformUnit();
}
 
开发者ID:broadinstitute,项目名称:picard,代码行数:5,代码来源:MultiLevelCollector.java

示例6: getID

import htsjdk.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
/**
 * Get the ID of the readgroup.
 */
public static String getID(final SAMReadGroupRecord rg) {
    final String pu = rg.getPlatformUnit();
    return pu == null ? rg.getId() : pu;
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:8,代码来源:ReadGroupCovariate.java

示例7: getPlatformUnit

import htsjdk.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
/**
 * Returns the platform unit associated with the provided read's read group.
 *
 * @param read read whose platform unit to retrieve
 * @param header SAM header containing read groups
 * @return the platform unit for the provided read's read group as a String,
 *         or null if the read has no read group.
 */
public static String getPlatformUnit( final GATKRead read, final SAMFileHeader header ) {
    final SAMReadGroupRecord readGroup = getSAMReadGroupRecord(read, header);
    return readGroup != null ? readGroup.getPlatformUnit() : null;
}
 
开发者ID:broadinstitute,项目名称:gatk,代码行数:13,代码来源:ReadUtils.java


注:本文中的htsjdk.samtools.SAMReadGroupRecord.getPlatformUnit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。