def parseStats(filename): url = urlparse(filename) fileType = url.scheme fileLocation = url.path.strip() if url.netloc: fileLocation = url.netloc tree = ET.parse(fileLocation) root = tree.getroot() root = _updateStats(root) stats = StatsMetadata(_eleToDictList(root)) stats.record["tag"] = "SummaryStats" whitelist = [ "ShortInsertFraction", "AdapterDimerFraction", "MedianInsertDist", "ProdDist", "ReadTypeDist", "ReadLenDist", "ReadQualDist", "InsertReadQualDist", "InsertReadLenDist", "ControlReadQualDist", "ControlReadLenDist", "NumSequencingZmws", ] stats.pruneChildrenTo(whitelist) return stats
def parseStats(filename): fileLocation = uri2fn(filename) tree = ET.parse(fileLocation) root = tree.getroot() root = _updateStats(root) stats = StatsMetadata(_eleToDictList(root)) stats.record['tag'] = 'SummaryStats' return stats
def parseStats(filename): url = urlparse(filename) fileLocation = url.path.strip() if url.netloc: fileLocation = url.netloc tree = ET.parse(fileLocation) root = tree.getroot() root = _updateStats(root) stats = StatsMetadata(_eleToDictList(root)) stats.record['tag'] = 'SummaryStats' return stats
def parseStats(filename): url = urlparse(filename) fileType = url.scheme fileLocation = url.path.strip() if url.netloc: fileLocation = url.netloc tree = ET.parse(fileLocation) root = tree.getroot() root = _updateStats(root) stats = StatsMetadata(_eleToDictList(root)) stats.record['tag'] = 'SummaryStats' whitelist = ['ShortInsertFraction', 'AdapterDimerFraction', 'NumSequencingZmws'] + DISTLIST stats.pruneChildrenTo(whitelist) return stats
def parseStats(filename): url = urlparse(filename) fileType = url.scheme fileLocation = url.path.strip() if url.netloc: fileLocation = url.netloc tree = ET.parse(fileLocation) root = tree.getroot() root = _updateStats(root) stats = StatsMetadata(_eleToDictList(root)) stats.record['tag'] = 'SummaryStats' whitelist = [ 'ShortInsertFraction', 'AdapterDimerFraction', 'MedianInsertDist', 'ProdDist', 'ReadTypeDist', 'ReadLenDist', 'ReadQualDist', 'InsertReadQualDist', 'InsertReadLenDist', 'ControlReadQualDist', 'ControlReadLenDist', 'NumSequencingZmws' ] stats.pruneChildrenTo(whitelist) return stats