modified: pixi.toml
[GalaxyCodeBases.git] / BioInfo / BS-Seq / bwa-meth / compare / run-bsmooth.sh
blob886227e922b8cca7ba20a2332da3ce1905393300
1 . ./common.sh
3 set -e
5 # bsmooth won't let you specify abs path...
6 ## INDEX
7 #mkdir bsmooth
8 #perl $BSMOOTH/bin/bswc_bowtie2_index.pl --name=bsmooth/$(basename $REF .fa) $REF
10 mkdir -p results/
11 prog=bsmooth
13 BAM=results/bsmooth/$prog-$name.bam
15 rm -f logs/$prog-$name.err logs/$prog-$name.out
16 mkdir -p results/$prog/$name/
17 echo "
18 perl $BSMOOTH/bin/bswc_bowtie2_align.pl \
19 --metrics results/$prog/$name-metrics.txt \
20 --out results/$prog/$name/ \
21 --bam $BAM \
22 -- bsmooth/$(basename $REF .fa) -- $REF \
23 -- --very-sensitive -p 8 -- $FQ1 -- $FQ2
25 samtools view -h $BAM.crick.bam | python src/bsmooth-adjust-crick.py | samtools view -bS - > $BAM.crick.fix.bam
26 java -jar $PICARD/MergeSamFiles.jar I=$BAM.watson.bam I=$BAM.crick.fix.bam O=$BAM AS=false " | bsub -J $prog-$name -e logs/$prog-$name.err -o logs/$prog-$name.out -n 12 -R "span[hosts=1]"
28 mkdir -p results/trim/bsmooth/
29 BAM=results/trim/bsmooth/$prog-$name.bam
30 rm -f logs/trim-$prog-$name.err logs/trim-$prog-$name.out
31 mkdir -p results/trim/$prog/$name/
32 echo "
33 perl $BSMOOTH/bin/bswc_bowtie2_align.pl \
34 --metrics results/trim/bsmooth/metrics.txt \
35 --out results/trim/$prog/$name/ \
36 --bam $BAM \
37 -- bsmooth/$(basename $REF .fa) -- $REF \
38 -- --very-sensitive -p 8 -- $TRIM_FQ1 -- $TRIM_FQ2
40 samtools view -h $BAM.crick.bam | python src/bsmooth-adjust-crick.py | samtools view -bS - > $BAM.crick.fix.bam
41 java -jar $PICARD/MergeSamFiles.jar I=$BAM.watson.bam I=$BAM.crick.fix.bam O=$BAM AS=false " | bsub -J trim-$prog-$name -e logs/trim-$prog-$name.err -o logs/trim-$prog-$name.out -n 12 -R "span[hosts=1]"