
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://img.shields.io/github/release/csiro-crop-informatics/repset.svg?style=flat-square&logo=github&label=latest%20release](https://github.com/csiro-crop-informatics/repset/releases) https://img.shields.io/github/commits-since/csiro-crop-informatics/repset/latest.svg?style=flat-square&logo=github](https://github.com/csiro-crop-informatics/repset/releases) https://img.shields.io/badge/nextflow-%E2%89%A519.10.0-orange.svg?style=flat-square](https://www.nextflow.io/)
REPSET or RREPSET or R²EPSET is a Reproducible, Reusable, Extensible, Portable and Scalable Evaluation Tool for short read aligners
conf/mappers.configexport NXF_VER=19.10.0 before running the workflow.The pipeline consists of several, partly dependent paths
which facilitate the evaluation of mappers using
either DNA- or RNA-Seq data, either real (temporarily unavailable) or simulated.
The paths can be executed separately or in a single run.
When running separately or re-running the pipeline
the -resume flag ensures that previously computed
results (or partial results) are re-used.
Default execution will simulate, align and evaluate reads from a few small data sets defined in conf/simulations.config.
Terms related to read mapping, alignment and related such as pseudoalignment and quasi mapping are used in bioinformatics inconsistently (which would make many a mathematician cringe). We hereby atte*** to strictly follow this convention by consistently propagating these inconsistencies.
There are several ways to execute the pipeline, each requires Nextflow and either Docker or Singularity. See nextflow.config for available execution profiles (or to add your own!), e.g. for local execution this could be
nextflow run csiro-crop-informatics/repset -profile docker
Tu run the workflow with Singularity on
First make sure that recent version of Singularity is available and then run
nextflow run csiro-crop-informatics/repset -profile singularity
On a Slurm cluster you can run
nextflow run csiro-crop-informatics/repset -profile slurm,singularity
Note! Multiple container images will be pulled in parallel from Docker Hub (and potentially other repositories. A https://github.com/nextflow-io/nextflow/issues/1210 (?) in singularity may cause the parallel processing to fail with an error message similar to
Error executing process > 'indexGenerator ([[species:Saccharomyces_cerevisiae, version:R64-1-1.44, seqtype:DNA], [tool:hisat2, version:2.1.0]])' Caused by: Failed to pull singularity image command: singularity pull --name rsuchecki-hisat2-2.1.0_4cb1d4007322767b562e98f69179e8ebf6d31fb1.img docker://rsuchecki/hisat2:2.1.0_4cb1d4007322767b562e98f69179e8ebf6d31fb1 > /dev/null status : 255
Until this is https://github.com/sylabs/singularity/issues/3634, our workaround is to run the following prior to running the main script, run
nextflow run csiro-crop-informatics/repset/pull_containers.nf
which will pull most of the containers used by the workflow (the remaining ones are unlikely to be pulled in parallel).
Note that singularity must be available on the node where you execute the pipeline, e.g. by running module load singularity/3.2.1 prior to running the pipeline.
It is also required on each compute node. Your cluster configuration should ensure that,
if it does not, the additional execution profile singularitymodule can be modified in nextflow.config to match your singularity module name and used at run-time.
If you are new to AWS batch and/or nextflow, follow this blog post, once you are done, or you already use AWS batch, simply run
nextflow run csiro-crop-informatics/repset \ -profile awsbatch \ -work-dir s3://your_s3_bucket/work \
after replacing your_s3_bucket with a bucket you have created on S3.
To reduce potential connectivity issues you may *** running the workflow from an EC2 instance.
This may guide your decision on where the result file(s) should be placed.
If you wish to deposit the result file(s) on s3, you can specify e.g. --outdir s3://your_s3_bucket/results,
otherwise you can find them under ./results.
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/monitoring-costs.html
The workflow incorporates three ways of mapping and evaluating reads, dna2dna, rna2rna, rna2dna
and by default all are executed. To restrict execution to one or two of those,
you can run the workflow with e.g.
--mapmode dna2dna - evaluate DNA-Seq read mapping to genome--mapmode rna2rna|rna2dna - evaluate RNA-Seq read mapping to genome and transcriptomeAn alignment/mapping tool is included in the evaluation if appropriate templates are included as specified below in Adding another mapper. To execute the workflow for only a subset of the available tools, you can specify e.g.
--mappers star - only evaluate a single tool--mappers 'bwa|bowtie2|biokanga' - evaluate a subset of toolsOther regular expressions can be specified to taylor the list of evaluated tools.
To run the pipeline with alternative input data you can use the -params-file flag
to specify a JSON or a YAML file to overwrite conf/simulations.config,
for example
nextflow run main.nf -params-file path/to/conf/simulations.json
Alternatively, you can simply edit the content of conf/simulations.config`.
Resources required for running the workflow can be substantial and will vary greatly depending on multiple factors, such as
We have empirically derived simple functions to allow resource requests
auto-scaling for key processes such as genome indexing and read mapping.
These depend on either the reference size or the number of reads and
were based on tools which were slowest or required the most memory.
Clearly if e.g. a slower tool is added, these will need to be revised.
However, failed tasks are re-submitted with increased resources as long as
valid comparisons can be made between different tools' results.
For that reason, CPUs and memory limits are not increased on re-submission
of the mapping process but the maximum allowed wall-clock time is.
In the case of the indexing process, the initial time and memory limits
are increased on each task re-submission as indexing performance is not
well suited for comparisons anyway. For example, many indexing processes
are single-threaded, in other cases it might make sense to skip the indexing
process and allow for on-the-fly index generation.
Resource auto-scaling
is subject to constraints which may need to be adjusted for particular
compute environment either at run time (e.g. --max_memory 64.GB --max_cpus 32 --max_time 72.h)
or by editing (conf/requirements.config)[conf/requirements.config]
where the dynamic scaling functions can also be adjusted.
Each pipeline run generates a number of files including
These can be simply collected from the output directories but for full traceability of the results, the following procedure is preferable:
Fork this repository
(Optional) select a tagged revision or add a tag (adhering to the usual semantic versioning approach)
Generate a https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line which will allow the pipeline to create releases in your forked repset repository, when creating the token it should suffice to select only the following scope:
public_repoAccess public repositories
(assuming your fork of repset remains public)
Make the access token accessible as an environmental variable
Run the pipeline from the remote repository, specifying
--release flag-profile-revision v0.9.10 (optional)For example,
CODE_TOKEN_7
On successful completion of the pipeline a series of API calls will be made to
--draft flag used)The last of this calls will trigger minting of a DOI for that release if Zenodo integration is configured and enabled for the repository.
To keep your release as a draft use the --draft flag.
Execution environment is captured in runmeta.json.
A mapper may be included for any or all of the mapping modes (dna2dna, rna2dna, rna2rna).
In each case the same indexing template will be used.
After you have cloned this repository add another entry in conf/mappers.config, under
CODE_TOKEN_8
For example, to add a hypothetical my_mapper version 1.0 you might add the following:
CODE_TOKEN_9
Additional script templates can be added for rna2rna and rna2dna mapping modes.
Script templates must be wrapped in either single ('script') or triple single ('''script''') quotes.
If you would rather keep the templates in separate files follow these instructions.
Applicable nextflow (not bash!) variables resolve as follows:
Indexing
${task.cpus} - number of cpu threads available to the indexing process${ref} - the reference FASTA filename - we use it both to specify the input file and the basename of the generated indexMapping
${task.cpus} - number of logical cpus available to the alignment process${ref} - basename of the index file (sufficient if aligner uses basename to find multi-file index, otherwise appropriate extension may need to be appended, e.g. ${ref}.idx).${reads[0]} and ${reads[1]} - filenames of paired-end reads${ALIGN_PARAMS} any additional params passed to the aligner
If you would rather keep the templates in separate files rather than embedded in conf/mappers.config
you can place each file under the appropriate template directory:
and instead of including the script template string directly in conf/mappers.config as we did above, set
rna2dna: true, which will be resolved to templates/rna2dna/my_mapper.shor, when using a different file name,
rna2dna: 'foo_bar.sh', which will be resolved to templates/rna2dna/foo_bar.shSee the header of conf/mappers.config for more details and limitations.
Add one or more sets of mapping parameters to conf/mapping_params.config, this is meant for parameter space exploration and should include any fine tuning params while the template should only include core params essential to mapper execution.
conf/mappers.configYou can upload a relevant container image to a docker registry (such as Docker Hub) or locate an existing one https://quay.io/organization/biocontainers. If you opt for an existing one, chose one with a specific version tag and a Dockerfile. Alternatively, follow our procedure below for defining per-tool container images and docker automated builds
We opt for Docker containers which can also be executed using Singularity. Container images are pulled from Docker Hub, but nextflow is able to access other registries and also local images, see relevant https://www.nextflow.io/docs/latest/singularity.html#singularity-docker-hub
Dockerfiles for individual tools used can be found under dockerfiles/.
This includes various mappers but also other tools used by the pipeline.
For each tool (or tool-set) we created a docker hub/cloud repository and configured automated builds.
Builds can be triggered from branches and tags.
The following approach relies on creating a branch for a specific version of a tool.
The same can be achieved by simply tagging the relevant commit, but this may result in proliferation of tags while branches can be merged into master and deleted while preserving the history.
If you'd rather use tags, in (2) change the 'Source type' below to 'Tag' and later tag an appropriate commit using (tags can be problematic - if tag is based on version of a tool and container needs to be updated, tags may have to be removed/re-added)docker/tool/version pattern rather than committing to a dedicated branch.
tool with the name of the tool).| Source type | Source | Docker Tag | Dockerfile location | Build Context |
|---|---|---|---|---|
| Branch | /^docker\/tool\/(.*)$/ | {\1} | tool.Dockerfile | /dockerfiles |
Checkout a new branch replacing tool and version with the intended tool name and version, respectively.
For example,
CODE_TOKEN_10
CODE_TOKEN_11
Add, create or modify dockerfiles/${tool}.Dockerfile as required.
Commit and push to trigger an automated build
CODE_TOKEN_12
This should trigger an automated build in the linked Docker Hub/cloud repository.
In case the automated build is not triggered for a newly created Docker repo, it may help to delete the Docker repo and repeat steps 1-3 above. Then push some innocuous change to the branch to trigger the build.
If everything works as intended, you may update conf/containers.config to the new tool version.
Then either create a PR to merge the new branch into master or, if you have write permissions for this repository or working on your fork of it, checkout master and merge.
CODE_TOKEN_13
TODO: add information on
If report template is sufficiently generic we will be able to easily render to html and PDF, otherwise we should settle for HTML(?).
Rendering of the report constitutes the final step of the pipeline and relies on a container defined in dockerfiles/renderer.Dockerfile for rendering environment.
There are several ways for rendering of the report outside the pipeline, with docker being the preferred option.
CODE_TOKEN_14
CODE_TOKEN_15
If you'd like to render the report without docker/singularity, you will need the following:
R e.g. on ubuntu sudo apt apt install r-base-corepandoc e.g. on ubuntu sudo apt install pandoc pandoc-citeprocLaTeX e.g. on ubuntu sudo apt install texlive texlive-latex-extraR packages:
rmarkdownrticlesbookdownThen:
CODE_TOKEN_16
Manuscript source is under manuscript/ sub directory on manuscript branch which should not be merged into master.
Application note is drafted in https://rmarkdown.rstudio.com/ in manuscript/repset.Rmd file.
RMarkdown is well integrated in RStudio, but can be written/edited in a text editor of your choice.
The manuscript will be rendered the pipeline is executed while manuscript branch is checked out, either
-revision manuscript at run-timeAppropriate revision of the master branch should first be mnerged into the manuscript branch.
The manuscript can be rendered outside the pipeline in a fashion analogous to how this can be done for the report,
just replace any use of report by manuscript.
Among the https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#specifying_a_bibliography we opted for BibTeX, see writing/references.bib.
` - evaluate all but this tool
Other regular expressions can be specified to taylor the list of evaluated tools.
To run the pipeline with alternative input data you can use the CODE_TOKEN_35 flag to specify a JSON or a YAML file to overwrite CODE_TOKEN_36, for example
nextflow run main.nf -params-file path/to/conf/simulations.json
Alternatively, you can simply edit the content of conf/simulations.config__CODE_TOKEN_37__--max_memory 64.GB --max_cpus 32 --max_time 72.h__CODE_TOKEN_38__conf/requirements.config__CODE_TOKEN_39__public_repo__CODE_TOKEN_40__--release__CODE_TOKEN_41__-profile__CODE_TOKEN_42__-revision v0.9.10__CODE_TOKEN_43__--draft__CODE_TOKEN_44__--draft__CODE_TOKEN_45__runmeta.json__CODE_TOKEN_46__dna2dna, rna2dna, rna2rna__CODE_TOKEN_47__conf/mappers.config__CODE_TOKEN_48__my_mapper__CODE_TOKEN_49__1.0__CODE_TOKEN_50__rna2rna__CODE_TOKEN_51__rna2dna__CODE_TOKEN_52__'script'CODE_TOKEN_53'''script'''CODE_TOKEN_54${task.cpus}CODE_TOKEN_55${ref}CODE_TOKEN_56${task.cpus}CODE_TOKEN_57${ref}CODE_TOKEN_58${ref}.idx__CODE_TOKEN_59__${reads[0]}CODE_TOKEN_60${reads[1]}CODE_TOKEN_61${ALIGN_PARAMS}__CODE_TOKEN_62__conf/mappers.config__CODE_TOKEN_63__templates/index__CODE_TOKEN_64__templates/dna2dna__CODE_TOKEN_65__templates/rna2dna__CODE_TOKEN_66__templates/rna2rna__CODE_TOKEN_67__conf/mappers.config__CODE_TOKEN_68__rna2dna: true,__CODE_TOKEN_69__templates/rna2dna/my_mapper.sh__CODE_TOKEN_70__rna2dna: 'foo_bar.sh',__CODE_TOKEN_71__templates/rna2dna/foo_bar.sh__CODE_TOKEN_72__conf/mappers.config__CODE_TOKEN_73__conf/mappers.config__CODE_TOKEN_74__dockerfiles/CODE_TOKEN_75__docker/tool/version__CODE_TOKEN_76__tool__CODE_TOKEN_77/^docker/tool/(.*)$/CODE_TOKEN_78{\1}CODE_TOKEN_79__tool.Dockerfile__CODE_TOKEN_80/dockerfiles__CODE_TOKEN_81__tool__CODE_TOKEN_82__version__CODE_TOKEN_83__dockerfiles/${tool}.Dockerfile__CODE_TOKEN_84__dockerfiles/renderer.Dockerfile__CODE_TOKEN_85__R__CODE_TOKEN_86__sudo apt apt install r-base-core__CODE_TOKEN_87__pandoc__CODE_TOKEN_88__sudo apt install pandoc pandoc-citeproc__CODE_TOKEN_89__LaTeX__CODE_TOKEN_90__sudo apt install texlive texlive-latex-extra__CODE_TOKEN_91__R__CODE_TOKEN_92__rmarkdown__CODE_TOKEN_93__rticles__CODE_TOKEN_94__bookdown__CODE_TOKEN_95__manuscript/CODE_TOKEN_96__manuscript__CODE_TOKEN_97__manuscript/repset.Rmd__CODE_TOKEN_98__manuscript__CODE_TOKEN_99-revision manuscript__CODE_TOKEN_100__manuscript__CODE_TOKEN_101__report__CODE_TOKEN_102__manuscript__CODE_TOKEN_103__writing/references.bib`](writing/references.bib).
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务