Dinh:COMPUTATIONAL/bisReadMapper: Difference between revisions

From ZhangLabWiki
Jump to navigation Jump to search
>Dinh
mNo edit summary
>Dinh
No edit summary
Line 27: Line 27:
   qualTrim=[#], perform quality trimming using this quality score
   qualTrim=[#], perform quality trimming using this quality score
   minDepth=[#], the minimum reads depth to call methylation in BED file.
   minDepth=[#], the minimum reads depth to call methylation in BED file.
  bam=[yes/no], the input reads file are already mapped and sorted bam files.


# Run the software:
# To run the software anywhere:
   /path/to/bisReadMapper.pl sample_name.params
   nohup /path/to/bisReadMapper.pl sample_name.params > sample_name.log &


# To run the mapping on Triton, you need to write a *.job file!
# To run the mapping on Triton, you need to write a *.job file!
Line 42: Line 43:
   #PBS -m abe
   #PBS -m abe
   #PBS -A zhang-lab
   #PBS -A zhang-lab
   cd /projects/zhang-lab/ddiep/Working/WGBS_Rui_mm9/test_Hg19
   cd /phase1/ddiep/Working/WGBS_Rui_mm9/test_Hg19
   /home/ddiep/softwares/bisReadMapper_v1.1/bisReadMapper.pl RL-KH4-Tn5mC.params
   /home/ddiep/softwares/bisReadMapper_v1.1/bisReadMapper.pl RL-KH4-Tn5mC.params


   Note:
   To submit the job:
  qsub name_of_file.job
 
Note about running Triton job:
   - for each job file, modify the *.log and *.err file names to make it specific to the sample or run
   - for each job file, modify the *.log and *.err file names to make it specific to the sample or run
   - wall time may needs to be increased for more reads. Longer walltime may put the job later in the queue, jobs with shorter walltimes will get processed faster.
   - wall time may needs to be increased for more reads. Longer walltime may put the job later in the queue, jobs with shorter walltimes will get processed faster.
   - change the email to your specific email address
   - change the email to your specific email address
   - change the "cd .. " to go to the current working directory
   - change the "cd .. " to go to the current working directory.
   - change the *.params file name, you can use the bisReadMapper in my directory.
   - change the *.params file name, you can use the bisReadMapper in my directory.
  - Since bisReadMapper generate a large amount of intermediate files, it is better to run on Oasis (ie. phase1/ddiep ) because it have a large storage capacity. Final methyl frequency files can be copied over to zhang-lab.
  - When calling all C methylation. I would run with "mapOnly=yes" in the parameters file. Post processing steps can be later be run in parallel on Triton.
    Post processing:
    (1) Convert sam to sorted bam (since samtools sort can't run in parallel, we will do this one at a time), but using just 1 node on Triton
    (2) Run multiple jobs of bisReadMapper with "bam=yes" in parallel for each chromosome. Note that each chromosome have a pair of *.bam files that is required for bisReadMapper

Revision as of 19:58, 7 June 2012

How to perform bisulfite reads mapping with bisReadMapper

  1. Know where the following files and software are:
 1) Reference index
 2) soap
 3) samtools
 4) reads (do not need to copy the reads to the current directory, nor concatenate them)
  1. Write the parameters file:
 Required:
 reads=s_5_1_sequence.txt,s_5_2_sequence.txt
 qualBase=[64/33]
 alignMode=[S/P]
 refDir=/path/to/bisRef
 soapDir=/path/to/soap
 samtoolsDir=/path/to/samtools
 soap2sam=/path/to/samtools/misc/soap2sam.pl
 name=Sample_Name (no space)
 Optional:
 numCPU=[#], number of processors to use for mapping
 allC=[yes/no], calls all methylation in all contexts?
 rmdup=[yes/no], remove PCR duplicates using samtools rmdup?
 snp=/path/to/dbSNP/snp134.txt
 mapOnly=[yes/no], perform mapping only to generate sam files.
 trim5=[#], number of bases to trim from 5' 
 trim3=[#], number of bases to trim from 3'
 qualTrim=[#], perform quality trimming using this quality score
 minDepth=[#], the minimum reads depth to call methylation in BED file.
 bam=[yes/no], the input reads file are already mapped and sorted bam files.
  1. To run the software anywhere:
 nohup /path/to/bisReadMapper.pl sample_name.params > sample_name.log &
  1. To run the mapping on Triton, you need to write a *.job file!
 #!/bin/csh
 #PBS -q small
 #PBS -l nodes=1:ppn=2
 #PBS -l walltime=36:00:00
 #PBS -o bisReadMapper_RL-KH4-Tn5mC_hg19.log
 #PBS -e bisReadMapper_RL-KH4-Tn5mC_hg19.err
 #PBS -V
 #PBS -M hdinhdp@gmail.com
 #PBS -m abe
 #PBS -A zhang-lab
 cd /phase1/ddiep/Working/WGBS_Rui_mm9/test_Hg19
 /home/ddiep/softwares/bisReadMapper_v1.1/bisReadMapper.pl RL-KH4-Tn5mC.params
 To submit the job:
 qsub name_of_file.job

Note about running Triton job:

 - for each job file, modify the *.log and *.err file names to make it specific to the sample or run
 - wall time may needs to be increased for more reads. Longer walltime may put the job later in the queue, jobs with shorter walltimes will get processed faster.
 - change the email to your specific email address
 - change the "cd .. " to go to the current working directory. 
 - change the *.params file name, you can use the bisReadMapper in my directory.
 - Since bisReadMapper generate a large amount of intermediate files, it is better to run on Oasis (ie. phase1/ddiep ) because it have a large storage capacity. Final methyl frequency files can be copied over to zhang-lab.
 - When calling all C methylation. I would run with "mapOnly=yes" in the parameters file. Post processing steps can be later be run in parallel on Triton. 
   Post processing:
   (1) Convert sam to sorted bam (since samtools sort can't run in parallel, we will do this one at a time), but using just 1 node on Triton
   (2) Run multiple jobs of bisReadMapper with "bam=yes" in parallel for each chromosome. Note that each chromosome have a pair of *.bam files that is required for bisReadMapper