linux如何并行喂入大量样本?

How to feed a large number of samples in parallel to linux?

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

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

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

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