Dinh:COMPUTATIONAL/bisReadMapper: Difference between revisions

From ZhangLabWiki
Jump to navigation Jump to search
>Dinh
No edit summary
>Dinh
mNo edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
==How to perform bisulfite reads mapping with bisReadMapper==
=MOST CURRENT scripts: refer to the following wiki pages=
# Know where the following files and software are:
[http://genome-tech.ucsd.edu/LabNotes/index.php/Dinh/Dinh_2014/NOTES/2014-8-27] August 27, 2014.
  1) Reference index
[http://genome-tech.ucsd.edu/LabNotes/index.php/Dinh/Dinh_2013/NOTES/2013-1-7] January 7, 2013.
  2) soap
  3) samtools
  4) reads (do not need to copy the reads to the current directory, nor concatenate them)
 
# 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.
 
# To run the software anywhere:
  nohup /path/to/bisReadMapper.pl sample_name.params > sample_name.log &
 
# 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

Latest revision as of 21:30, 27 August 2014

MOST CURRENT scripts: refer to the following wiki pages[edit]

[1] August 27, 2014. [2] January 7, 2013.