-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1_art_sims.sh
46 lines (34 loc) · 994 Bytes
/
1_art_sims.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
#$ -S /bin/bash
#$ -N refBias_art
#$ -l h_vmem=10G
#$ -l tmem=10G
#$ -l h_rt=5:0:0
#$ -j y
#$ -t 1-163
#$ -l tscratch=10G
#$ -o /temp
hostname
date
TEMP_DIR=$JOB_ID.$SGE_TASK_ID;
mkdir -p $TEMP_DIR;
function finish {
rm -rf $JOB_ID.$SGE_TASK_ID
}
trap finish EXIT ERR
REF=reference/Mycobacterium_tuberculosis_h37rv.ASM19595v2.dna_sm.toplevel.fa;
IN_DIR=bias_ref/assembly/ncbi-genomes-2022-05-09;
OUT_DIR=bias_ref/assembly/art_sims;
mkdir -p $OUT_DIR
SAMPLE=$(awk "NR==${SGE_TASK_ID}" bias_ref/assembly/assemblies_final.txt)
FILE=$IN_DIR/$SAMPLE/${SAMPLE}_genomic.fna.gz
zcat $FILE > $TEMP_DIR/${SAMPLE}_genomic.fna;
FILE=$TEMP_DIR/${SAMPLE}_genomic.fna;
for n in {1..10}; do
art_illumina -ss HSXt -p -i $FILE -l 150 -f 50 -m 650 -s 150 -na -o $TEMP_DIR/$SAMPLE.rep${n};
ls -l $TEMP_DIR;
gzip -c $TEMP_DIR/$SAMPLE.rep${n}1.fq > $OUT_DIR/$SAMPLE.rep${n}_1.fastq.gz;
gzip -c $TEMP_DIR/$SAMPLE.rep${n}2.fq > $OUT_DIR/$SAMPLE.rep${n}_2.fastq.gz;
done
hostname
date