Improve the bash code for picard analysis
0
0
Entering edit mode
15 months ago
rj.rezwan • 0

HI, please help me to improve the following code of picard for multiple files. All .bam files are in the ~/path/file/mapped/

Code is given here

#!/bin/bash
#SBATCH --array=1-23
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=6
#SBATCH --time=06:00:00
#SBATCH --mem-per-cpu=30G
#SBATCH --job-name=1_23_duplicate
#SBATCH --output=1_23_duplicate.%A_%a.out


module load picard/2.20.4
var=$(ls /path/file/mapped/)
outdir="/scratch/abc/markduplication/"
N=${SLURM_ARRAY_TASK_ID}
v=${var[{N}-1]}
files="/path/file/mapped/${v}"
output=${outdir}${v}_marked.bam
picard -Xmx24G MarkDuplicates I=${files} O=${output} ASSUME_SORTED=true COMPRESSION_LEVEL=9 VALIDATION_STRINGENCY=LENIENT

and the layout of the files is given in the image

enter image description here

bash picard slurm • 514 views
ADD COMMENT
1
Entering edit mode

help me to improve the following code of picard for multiple files

use a workflow manager like nextflow or snakemake. This is the answer.

ADD REPLY

Login before adding your answer.

Traffic: 1746 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6