Dinh/Dinh 2013/NOTES/2013-1-7: Difference between revisions
Jump to navigation
Jump to search
>Dinh (Created page with "==bisReadMapper pipeline== ===Triton=== * Write a shell script as follows: <nowiki> # current directory: change the following path to your working directory. cur_dir="/oasis...") |
>Dinh mNo edit summary |
||
Line 2: | Line 2: | ||
===Triton=== | ===Triton=== | ||
* | * First map reads using a shell script: | ||
* Edit '''Go.mapBisulfite.sh''' as follows: | |||
<nowiki> | <nowiki> | ||
### EDIT below #### | |||
# current directory: change the following path to your working directory. | # current directory: change the following path to your working directory. | ||
cur_dir="/oasis/triton/scratch/ddiep/Working/WGBS_Noi_hg19/HELLO" | cur_dir="/oasis/triton/scratch/ddiep/Working/WGBS_Noi_hg19/HELLO" | ||
Line 11: | Line 14: | ||
reads_dir="/oasis/triton/scratch/ddiep/Working/WGBS_Noi_hg19/HELLO" | reads_dir="/oasis/triton/scratch/ddiep/Working/WGBS_Noi_hg19/HELLO" | ||
# List the index names (or unique names to each read files | |||
INDX="Indx1 Indx2 Indx3" | |||
email="ddiep@ucsd.edu" | |||
mm=2 # max number of allowable mismatches | |||
qual=64 # base quality offset value | |||
qtrim=20 # Phred quality value for soft-trimming | |||
threetrim=0 # number of bases to trim from 3' end (rightmost) | |||
fivetrim=0 # number of bases to trim from 5' end (leftmost) | |||
p=8 | |||
### DO NOT EDIT, unless you know where these files are #### | |||
# the following paths should stay the same on triton. | # the following paths should stay the same on triton. | ||
bisReadMapper="/home/ddiep/scripts/MethylationPipeline/smartBisReadMapper.pl" | bisReadMapper="/home/ddiep/scripts/MethylationPipeline/smartBisReadMapper.pl" | ||
template_fwd="/projects/zhang-lab/ddiep/LatestGenome/bisHg19/hg19.fa.bis.fwd.index" | template_fwd="/projects/zhang-lab/ddiep/LatestGenome/BisRef/bisHg19/hg19.fa.bis.fwd.index" | ||
template_rev="/projects/zhang-lab/ddiep/LatestGenome/bisHg19/hg19.fa.bis.rev.index" | template_rev="/projects/zhang-lab/ddiep/LatestGenome/BisRef/bisHg19/hg19.fa.bis.rev.index" | ||
template_fa="/projects/zhang-lab/ddiep/LatestGenome/bisHg19/hg19.fa" | template_fa="/projects/zhang-lab/ddiep/LatestGenome/BisRef/bisHg19/hg19.fa" | ||
soap="/home/ddiep/softwares/soap2.21release/soap" | soap="/home/ddiep/softwares/soap2.21release/soap" | ||
############################################################ | |||
cd $cur_dir | cd $cur_dir | ||
for n in ${INDX} | for n in ${INDX} | ||
do | do | ||
f="s_1_1_$n.txt" | f="s_1_1_$n.txt" # name format for read 1, make sure it matches the file names | ||
g="s_1_2_$n.txt" | g="s_1_2_$n.txt" # name format for read 2, make sure it matches the file names | ||
echo "#!/bin/csh" > $n.job | echo "#!/bin/csh" > $n.job | ||
echo "#PBS -q small" >> $n.job | echo "#PBS -q small" >> $n.job | ||
Line 38: | Line 53: | ||
echo "cd $cur_dir" >> $n.job | echo "cd $cur_dir" >> $n.job | ||
echo "$bisReadMapper -r $reads_dir/$f,$reads_dir/$g -m | echo "$bisReadMapper -r $reads_dir/$f,$reads_dir/$g -m $mm -W $template_fwd -C $template_rev -g $template_fa -a $soap -b $qual -p $p -n $n -q $qtrim -5 $fivetrim -3 $threetrim > $n.status" >> $n.job | ||
echo "rm *encoded" >> $n.job | echo "rm *encoded" >> $n.job | ||
qsub $n.job | qsub $n.job | ||
done | done</nowiki> | ||
* Run the script: | |||
</nowiki> | sh Go.mapBisulfite.sh |
Revision as of 02:45, 11 January 2013
bisReadMapper pipeline
Triton
- First map reads using a shell script:
- Edit Go.mapBisulfite.sh as follows:
### EDIT below #### # current directory: change the following path to your working directory. cur_dir="/oasis/triton/scratch/ddiep/Working/WGBS_Noi_hg19/HELLO" # reads directory: change the following path to the reads directory # reads_dir and cur_dir doesn't have to be the same reads_dir="/oasis/triton/scratch/ddiep/Working/WGBS_Noi_hg19/HELLO" # List the index names (or unique names to each read files INDX="Indx1 Indx2 Indx3" email="ddiep@ucsd.edu" mm=2 # max number of allowable mismatches qual=64 # base quality offset value qtrim=20 # Phred quality value for soft-trimming threetrim=0 # number of bases to trim from 3' end (rightmost) fivetrim=0 # number of bases to trim from 5' end (leftmost) p=8 ### DO NOT EDIT, unless you know where these files are #### # the following paths should stay the same on triton. bisReadMapper="/home/ddiep/scripts/MethylationPipeline/smartBisReadMapper.pl" template_fwd="/projects/zhang-lab/ddiep/LatestGenome/BisRef/bisHg19/hg19.fa.bis.fwd.index" template_rev="/projects/zhang-lab/ddiep/LatestGenome/BisRef/bisHg19/hg19.fa.bis.rev.index" template_fa="/projects/zhang-lab/ddiep/LatestGenome/BisRef/bisHg19/hg19.fa" soap="/home/ddiep/softwares/soap2.21release/soap" ############################################################ cd $cur_dir for n in ${INDX} do f="s_1_1_$n.txt" # name format for read 1, make sure it matches the file names g="s_1_2_$n.txt" # name format for read 2, make sure it matches the file names echo "#!/bin/csh" > $n.job echo "#PBS -q small" >> $n.job echo "#PBS -l nodes=1:ppn=8" >> $n.job echo "#PBS -l walltime=36:00:00" >> $n.job echo "#PBS -o $n.log" >> $n.job echo "#PBS -e $n.err" >> $n.job echo "#PBS -V" >> Idx$n.job echo "#PBS -M diep.hue.dinh@gmail.com" >> $n.job echo "#PBS -m abe" >> $n.job echo "#PBS -A zhang-lab" >> $n.job echo "cd $cur_dir" >> $n.job echo "$bisReadMapper -r $reads_dir/$f,$reads_dir/$g -m $mm -W $template_fwd -C $template_rev -g $template_fa -a $soap -b $qual -p $p -n $n -q $qtrim -5 $fivetrim -3 $threetrim > $n.status" >> $n.job echo "rm *encoded" >> $n.job qsub $n.job done
- Run the script:
sh Go.mapBisulfite.sh