Skip to content

Bedtools#15

Merged
Yunuuuu merged 12 commits intoWangLabCSU:mainfrom
Gates369:bedtools
Sep 19, 2025
Merged

Bedtools#15
Yunuuuu merged 12 commits intoWangLabCSU:mainfrom
Gates369:bedtools

Conversation

@Gates369
Copy link
Contributor

@Gates369 Gates369 commented Jun 4, 2025

@Yunuuuu @ShixiangWang @SunPast please take a look

_1 版提供了一个子命令的形式,是否合适?有没有更好的办法?

@Gates369
Copy link
Contributor Author

Gates369 commented Jun 7, 2025

@Yunuuuu Please take a look
_1版提供了一个子命令的形式,是否合适?有没有更好的办法?

Copy link
Collaborator

@Yunuuuu Yunuuuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another suggestion: it would be helpful to include some tests, as they would give me a clearer understanding of whether the command is working correctly.

R/cmd-bedtools.R Outdated
inherit = Command,
private = list(
alias = function() "bedtools",
setup_help_params = function() "help",
Copy link
Collaborator

@Yunuuuu Yunuuuu Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我试了下,bedtools命令的帮助文档参数应该是"--help"

blit::appmamba("create", "--yes", "--name bedtools", "bioconda::bedtools")
exec("bedtools", "--help") |>
    cmd_condaenv("bedtools") |>
    cmd_run()

exec("bedtools", "intersect", "--help") |>
    cmd_condaenv("bedtools") |>
    cmd_run()

#' @family command
#' @export
# bedtools_intersect ----
bedtools_intersect <- make_command(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你已经创建了bedtools命令后,这个函数直接调用前面创建的函数就行

bedtools_intersect <- function(...) {
  bedtools(sucmd ="intersect", ...) # do your work
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此文件所有的函数都可以改成此形式,当然,实际上由subcmd参数,实际上这些函数不要也可

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,我当时上课跟他说过。只是让他提交记录下。

@Gates369 可以考虑只保留一个 clean 的简单版本,其他可以删除 commit 下。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一般尽量不导致大数量的改变,这样有利于review,这个文件跟此PR功能无关,需保持原状

@Gates369
Copy link
Contributor Author

Gates369 commented Jun 7, 2025

@Yunuuuu @ShixiangWang
保留了一个简化版本;去除了大部分不必要的修改;依葫芦画瓢添加了一段测试代码,但不知道是否有用,尝试运行,始终报错,不太理解
屏幕截图 2025-06-07 201411
屏幕截图 2025-06-07 201709
另外,注意到cmd-samtools的描述部分似乎是形容python的,不知是否是bug

@Yunuuuu
Copy link
Collaborator

Yunuuuu commented Jun 10, 2025

从这个测试看,应该是这个bedtools没有在PATH里面

@ShixiangWang
Copy link
Contributor

@Gates369 env_path 设置到 ~/miniconda3/bin(指定去哪里寻找), bedtools 位于这个目录下,不需要指定到程序的全部路径上。

@Gates369
Copy link
Contributor Author

Gates369 commented Jul 7, 2025

@Yunuuuu
彭老师,辛苦您再看一下我这部分代码还有哪些需要改正的地方,以及该如何进行测试呢?

@SunPast
Copy link
Collaborator

SunPast commented Sep 8, 2025

基本没有问题了,麻烦老师合并一下,我这边貌似还是没有权限合并 @ShixiangWang @Yunuuuu

@Yunuuuu Yunuuuu merged commit 6584469 into WangLabCSU:main Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants