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


Java ScanHeader类代码示例

本文整理汇总了Java中org.systemsbiology.jrap.stax.ScanHeader的典型用法代码示例。如果您正苦于以下问题:Java ScanHeader类的具体用法?Java ScanHeader怎么用?Java ScanHeader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getRetentionTime

import org.systemsbiology.jrap.stax.ScanHeader; //导入依赖的package包/类
private BigDecimal getRetentionTime(ScanHeader header) {
    // In the schema, retentionTime is "xs:duration" 
    // http://www.w3schools.com/Schema/schema_dtypes_date.asp
    String rt = header.getRetentionTime();
    if(rt == null)  return null;
    rt = rt.trim();
    
    Matcher m = rtPattern.matcher(rt);
    if(m.matches()) {
        String time = m.group(1);
        if(time != null) {
            return new BigDecimal(time);
        }
    }
    return null;
}
 
开发者ID:yeastrc,项目名称:msdapl,代码行数:17,代码来源:MzXmlFileReader.java

示例2: getRetentionTime

import org.systemsbiology.jrap.stax.ScanHeader; //导入依赖的package包/类
/**
 * @param header
 * @return
 */
private BigDecimal getRetentionTime(ScanHeader header) {
    // In the schema, retentionTime is "xs:duration" 
    // http://www.w3schools.com/Schema/schema_dtypes_date.asp
    String rt = header.getRetentionTime();
    if(rt == null)  return null;
    rt = rt.trim();
    
    Matcher m = rtPattern.matcher(rt);
    if(m.matches()) {
        String time = m.group(1);
        if(time != null) {
            return new BigDecimal(time);
        }
    }
    return null;
}
 
开发者ID:yeastrc,项目名称:proxl-web-app,代码行数:21,代码来源:MzMl_MzXml_FileReader.java

示例3: getNextScan

import org.systemsbiology.jrap.stax.ScanHeader; //导入依赖的package包/类
@Override
public MsScanIn getNextScan() throws DataProviderException {
    if(numScansRead >= numScans)
        return null;
    Scan scan = null;
    if(parser.hasNextScan()) {
        try {
            scan = parser.getNextScan();
        }
        catch (XMLStreamException e) {
            throw new DataProviderException("Error reading scan.", e);
        }
    }
    if(scan == null)
        return null;
    
    ScanHeader header = scan.getHeader();
    MzXmlScan mScan = new MzXmlScan();
    mScan.setMsLevel(header.getMsLevel());
    mScan.setStartScanNum(header.getNum());
    mScan.setEndScanNum(header.getNum());
    
    if(header.getMsLevel() == 1) {
        this.lastMs1ScanNumber = mScan.getStartScanNum();
    }
    else if(header.getMsLevel() > 1) {
        
        if(header.getPrecursorScanNum() > 0) {
            if(header.getPrecursorScanNum() != this.lastMs1ScanNumber) {
                throw new DataProviderException("last MS1 scan: "+this.lastMs1ScanNumber+
                        " is not the same as precursor scan number: "+header.getPrecursorScanNum()+
                        " for scan: "+header.getNum());
            }
            mScan.setPrecursorScanNum(header.getPrecursorScanNum());
        }
        else {
            mScan.setPrecursorScanNum(this.lastMs1ScanNumber);
        }
        mScan.setPrecursorMz(new BigDecimal(header.getPrecursorMz()));
    }
    mScan.setRetentionTime(getRetentionTime(header));
    if(header.getCentroided() != -1)
        mScan.setDataConversionType(getDataConversionType(header.getCentroided()));
    else
        mScan.setDataConversionType(this.dataConvType);
    
    mScan.setPeakCount(header.getPeaksCount());
    double[][] mzInt = scan.getMassIntensityList();
    // Peak 0 mass = list[0][0], peak 0 intensity = list[1][0]
    // Peak 1 mass = list[0][1], peak 1 intensity = list[1][1]
    for(int i = 0; i < header.getPeaksCount(); i++) {
        double mz = mzInt[0][i];
        double intensity = mzInt[1][i];
        mScan.addPeak(mz, (float)intensity);
    }
    return mScan;
}
 
开发者ID:yeastrc,项目名称:msdapl,代码行数:58,代码来源:MzXmlFileReader.java

示例4: MSScan

import org.systemsbiology.jrap.stax.ScanHeader; //导入依赖的package包/类
public MSScan(ScanHeader s)
{
    _scan = s;
}
 
开发者ID:dhmay,项目名称:msInspect,代码行数:5,代码来源:MSRun.java


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