gpt4 book ai didi

linux - 如何并行地向linux提供大量样本?

转载 作者:太空狗 更新时间:2023-10-29 12:40:52 25 4
gpt4 key购买 nike

我正在尝试对大量样本运行以下命令。

java -jar GenomeAnalysisTK.jar                  \
-R scaffs_HAPSgracilaria92_50REF.fasta \
-T HaplotypeCaller \
-I assembled_reads/{sample_name}.sorted.bam \
--emitRefConfidence GVCF \
-ploidy 1 \
-nt {number of cores} \
-nct {number of threds} \
-o {sample_name}.raw.snps.indels.g.vcf

我有:

3312 cores,
20 PB RAM of memory,
110 TFLOPS of compute power

但我有数千个这样的样本要处理。

每个示例大约需要一两天才能在我的本地计算机上完成。

如果有帮助的话,我正在使用一个共享的 linux 集群和一个名为 Slurm 的作业调度系统。

最佳答案

编写如下提交脚本,使用sbatch命令提交。

#!/bin/bash
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=<nb of threads your Java application is able to use>
#SBATCH --mem=<number of MB of RAM your job needs>
#SBATCH --time=<duration of your job>
#SBATCH --array=1-<number of samples>

FILES=(assembled_reads/*.sorted.bam)

INFILE=${FILES[$SLURM_TASK_ARRAY_ID]}
OUTFILE=$(basename $INFILE .sorted.bam).raw.snps.indels.g.vcf

srun java -jar GenomeAnalysisTK.jar -R scaffs_HAPSgracilaria92_50REF.fasta -T HaplotypeCaller -I $INFILE --emitRefConfidence GVCF -ploidy 1 -nt 1-nct $SLURM_CPUS_PER_TASK -o $OUTFILE

这完全是未经测试的,只是为了给你一个第一个方向。

我相信您使用的集群的管理员已经编写了一些文档,第一步是通读一遍。

关于linux - 如何并行地向linux提供大量样本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44832715/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com