有没有办法使用 sbatch 提交作业以将作业 id 记录到变量中?
job_id = sbatch --account my_account some_script.sh
echo $job_id
17210254
Run Code Online (Sandbox Code Playgroud) 如何让 Snakemake 激活我的环境列表中已存在的 conda 环境?
我知道您可以将其--use-conda与.yaml环境文件一起使用,但这似乎会生成一个新环境,当环境已经存在时,这会很烦人。任何对此的帮助将不胜感激。
我尝试过使用:
conda:
path/to/some/yamlFile
Run Code Online (Sandbox Code Playgroud)
但它只是返回环境中包的命令未找到错误
我试图循环遍历目录中的所有 html 文件,但收到此错误:
NotImplementedError: Non-relative patterns are unsupported
Run Code Online (Sandbox Code Playgroud)
我正在使用的代码是:
from bs4 import BeautifulSoup
import argparse
from pathlib import Path
parser = argparse.ArgumentParser(description = ("Script to scrape data from antismash html output"))
parser.add_argument("-p", "--path", help = "give path/to/directory containing antismash outputs", required = True)
args = parser.parse_args()
for file in Path(args.path).glob("/*.html"):
def scraper(filename):
soup = BeautifulSoup(open(filename), 'html.parser')
soup.findAll('a') > os.path.basename(filename).txt
Run Code Online (Sandbox Code Playgroud)
我以前使用过相同的方法,但没有收到错误,所以我不确定发生了什么。