Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TGS流程磁盘储存资源占用过大 #54

Closed
jwli-code opened this issue May 17, 2024 · 3 comments
Closed

TGS流程磁盘储存资源占用过大 #54

jwli-code opened this issue May 17, 2024 · 3 comments

Comments

@jwli-code
Copy link

郑博士你好,我跑TGS的流程后发现 生成文件夹 02_bam 文件夹中同时保留了bam文件和 sort.bam文件,我的存储资源不是很大,生成sort.bam文件后是否就不需要bam文件?应该更改哪里的源代码可以实现这个目的。

@jwli-code
Copy link
Author

rule sort_bam:
    input:
        lambda wildcards: "02_bam/{sample}.{platform}.{mapper}.bam".format(sample=wildcards.sample, platform=get_platform(wildcards), mapper=MAPPER)
    output:
        "02_bam/{sample}.{platform}.{mapper}.sort.bam"
    threads: 10
    resources:
        mem_mb = 10000
    shell:
        """
         {SAMTOOLS} sort -@ {threads} -O BAM -o {output} {input}
         rm {input}
        """

改正这些是否就足够

@starskyzheng
Copy link
Owner

也许可以,您可以试试。
但建议您参考这个来做:https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#step-6-temporary-and-protected-files

@jwli-code
Copy link
Author

十分感谢 按照你推荐的已经测试成功

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

No branches or pull requests

2 participants