本文整理汇总了Java中net.sf.samtools.SAMReadGroupRecord.setSample方法的典型用法代码示例。如果您正苦于以下问题:Java SAMReadGroupRecord.setSample方法的具体用法?Java SAMReadGroupRecord.setSample怎么用?Java SAMReadGroupRecord.setSample使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.samtools.SAMReadGroupRecord
的用法示例。
在下文中一共展示了SAMReadGroupRecord.setSample方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeGenomeSAMFileHeader
import net.sf.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
/**
* create a header object complete with a HD and SQ lines
*
* @param seqinfo
* @return
*/
private SAMFileHeader makeGenomeSAMFileHeader(File genome, String readgroup) throws IOException {
// get sequence information from the genome fai file
File genomefai = new File(genome.getAbsoluteFile() + ".fai");
BufferedReader faireader = BufferedReaderMaker.makeBufferedReader(genomefai);
String s;
SAMFileHeader header = new SAMFileHeader();
header.setTextHeader("@HD VN:1.0 SO:unsorted");
while ((s = faireader.readLine()) != null) {
String[] ssplit = s.split("\t");
header.addSequence(new SAMSequenceRecord(ssplit[0], Integer.parseInt(ssplit[1])));
}
// add a read group line to the header with the string readgroup specifying the
// the actual RG name, the sample, and library
SAMReadGroupRecord rgr = new SAMReadGroupRecord(readgroup);
rgr.setPlatform("ILLUMINA");
rgr.setLibrary(readgroup);
rgr.setSample(readgroup);
header.addReadGroup(new SAMReadGroupRecord(readgroup, rgr));
return header;
}
示例2: createRG
import net.sf.samtools.SAMReadGroupRecord; //导入方法依赖的package包/类
private SAMReadGroupRecord createRG(String id, String sample) {
SAMReadGroupRecord ret = new SAMReadGroupRecord(id);
if (sample != null) {
ret.setSample(sample);
}
return ret;
}