def regexp_check(pattern, text):
return re.search(pattern, text, re.MULTILINE)
def more_recent(pattern, text):
version = text.strip()
return version >= pattern
公司logo设计
# A list of tools to check.
TOOLS = [
# Name, pattern, required, match_func
('bwa', '', True, regexp_check),
('datamash --version', '', True, regexp_check),
颜名称颜对照表图片('fastqc --version', '', True, regexp_check),
('hisat2', '', True, regexp_check),
('seqret --version', '', True, regexp_check),
('subread-align', '', True, regexp_check),
('featureCounts', '', True, regexp_check),
('R --version', '3.\d', True, regexp_check),
('efetch -version', '5.60', True, more_recent),
('esearch -version', '5.60', True, more_recent),
('samtools --version', '1.3', True, more_recent),
('fastq-dump -version', '2.8.0', True, more_recent),
java怎么获取当前时间('wonderdump', '', False, regexp_check),
('global-align.sh', '', False, regexp_check),
('local-align.sh', '', False, regexp_check),
]
def bash_check():
bashrc = expanduser("~/.bashrc")
bashprofile = expanduser("~/.bash_profile")
def path_check():
errors = 0
# The PATH variable
paths = ('PATH').split(':')
bindir = expanduser("~/bin")
#
xml文件用什么软件写
# We need ~/bin to be in the PATH
#
if bindir not in paths:
errors += 1
print("# The ~/bin folder is not in your PATH!")
return errors
def tool_check(tools):
errors = 0
print("# Checking {} ".format(len(tools)))
python入门教程非常详细wordfor cmd, pattern, required, callback in tools:
args = cmd.split()
try:
proc = subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE)            stdout, stderr = procmunicate()
except OSError as exc:
if required:
word = cmd.split()[0]
print("# Missing program: {}".format(word))
errors += 1
else:购物车界面设计
print("# Optional program not found: {}".format(cmd))
continue
stdout = stdout.decode('utf-8')
stderr = stderr.decode('utf-8')
output = stdout + stderr
if pattern:
if not callback(pattern, output):

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。