Mercurial > repos > mingchen0919 > aurora_star
comparison build-and-run-job-scripts.sh @ 0:25602263cff0 draft default tip
planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
author | mingchen0919 |
---|---|
date | Sun, 30 Dec 2018 13:11:48 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:25602263cff0 |
---|---|
1 # run SHELL_SCRIPT within tool outputs directory | |
2 cd ${REPORT_FILES_PATH} | |
3 | |
4 #--------- job 1: index genome -------- | |
5 # create genome directory for genome indexes | |
6 mkdir -p ${X_d}/genomeDir | |
7 | |
8 cat >temp.sh <<EOF | |
9 STAR \\ | |
10 --runMode genomeGenerate \\ | |
11 --genomeDir ${X_d}/genomeDir \\ | |
12 --genomeFastaFiles $( echo ${X_A} | sed 's/,/ /g' ) \\ | |
13 --sjdbGTFfile ${X_B} \\ | |
14 --sjdbOverhang ${X_C} \\ | |
15 > genome-indexing.log.txt 2>&1 | |
16 EOF | |
17 | |
18 grep -v None temp.sh > index-genome.sh | |
19 | |
20 # run star | |
21 sh index-genome.sh | |
22 | |
23 #--------- job 2: mapping --------- | |
24 cat >temp.sh <<EOF | |
25 STAR \\ | |
26 --genomeDir ${X_d}/genomeDir \\ | |
27 --readFilesIn \\ | |
28 ${X_F} \\ | |
29 ${X_R} \\ | |
30 > mapping.log.txt 2>&1 | |
31 EOF | |
32 | |
33 grep -v None temp.sh > mapping.sh | |
34 | |
35 # remove temp.sh | |
36 rm temp.sh | |
37 | |
38 # run mapping | |
39 sh mapping.sh | |
40 | |
41 | |
42 | |
43 #--------- job 3: SAM to sorted BAM ------ | |
44 echo "samtools sort -o Aligned.out.sorted.bam Aligned.out.sam" > sam2bam.sh | |
45 sh sam2bam.sh | |
46 | |
47 #--------- job 4: evaluate mapping ------- | |
48 echo "samtools flagstat Aligned.out.sorted.bam > flagstat.txt" > flagstat.sh | |
49 sh flagstat.sh |