2017-06-29 16 views
2

我想在大量的样本上运行以下命令。如何将大量样本并行地加入到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,如果有帮助。

回答

0

编写提交脚本,如下所示,并使用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 

这是完全未经测试的,只是旨在为您提供第一个方向。

我确定你使用的集群的管理员已经写了一些文档,第一步是阅读它的封面。

+0

感谢您的回复,没有太多的文档让你开始。 – user1952312

相关问题