# HG changeset patch # User dongjun # Date 1357857189 18000 # Node ID ce96e302ee9270ebedfaf6ff9c36392d58bd77dc # Parent 002dc17c9824ae486af2929eb5e73ffeaa43cd79 Uploaded diff -r 002dc17c9824 -r ce96e302ee92 mosaics.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mosaics.xml Thu Jan 10 17:33:09 2013 -0500 @@ -0,0 +1,313 @@ + + + + + + + + R + + + + mosaics_wrapper.pl + ## ChIP file info + $readFileType.chipParams.chip + $readFileType.chipParams.chipFileFormat + ## control file info + $readFileType.controlParams.control + $readFileType.controlParams.controlFileFormat + ## peak file info + $out_peak + $OutfileFormat + ## analysis type + IO + ## optional output + $report_summary + $report_gof + $report_exploratory + ## settings for model fitting and peak calling: required (FALSE, FALSE, 0.05, 200, 50, 0) + $readFileType.pet + $by_chr + $fdrLevel + $fragLen + $binSize + $capping + #if $fitParams.fSettingsType == "preSet" + ## settings for model fitting and peak calling: optional + BIC + automatic + 0.25 + 200 + 50 + 10 + ## setting for parallel computing + TRUE + 8 + #else + $fitParams.signalModel + $fitParams.bgEst + $fitParams.d + $fitParams.maxgap + $fitParams.minsize + $fitParams.thres + $fitParams.parallel + $fitParams.nCore + #end if + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + summary == 1 + + + gof == 1 + + + exploratory == 1 + + + + + +**What it does** + +MOSAiCS is a statistical framework for the analysis of ChIP-seq data and it stands for MOdel-based one and two Sample Analysis and Inference for ChIP-Seq Data. MOSAiCS is based on a flexible parametric mixture modeling approach for detecting peaks (i.e., enriched regions). +MOSAiCS is also available in Bioconductor_ as a R package. +We encourage questions or requests regarding MOSAiCS to be posted on our `Google group`_. + +Please cite: Kuan PF, Chung D, Pan G, Thomson JA, Stewart R, and Keles S (2011), "`A statistical framework for the analysis of ChIP-Seq data`_," *Journal of the American Statistical Association*, Vol. 106, pp. 891--903. + +.. _Bioconductor: http://www.bioconductor.org/help/bioc-views/2.11/bioc/html/mosaics.html +.. _Google group: http://groups.google.com/group/mosaics_user_group +.. _A statistical framework for the analysis of ChIP-Seq data: http://pubs.amstat.org/doi/abs/10.1198/jasa.2011.ap09706 + +------ + +**Input formats** + +MOSAiCS accepts aligned read files of ChIP and control samples as input. Currently, MOSAiCS accepts Eland result, Eland extended, Eland export, Bowtie default, SAM, BED, and CSEM formats for single-end tag (SET) data. For paired-end tag (PET) data, MOSAiCS accepts Eland result and SAM formats. + +------ + +**Outputs** + +Peak calling results of MOSAiCS can be exported into BED or GFF file formats, or as a table. Each line of the output file specifies a single peak. + +If the output is a table, it has the following columns:: + + Column Description + -------- -------------------------------------------------------- + 1 Chromosome of the peak + 2 Start position of the peak + 3 End position of the peak + 4 Width of the peak + 5 Averaged posterior probability of the peak + 6 Minimum posterior probability of the peak + 7 Averaged ChIP tag counts of the peak + 8 Maximum ChIP tag counts of the peak + 9 Averaged control tag counts of the peak + 10 Averaged control tag counts of the peak, scaled by sequencing depth + 11 Averaged log base 2 ratio of ChIP over input tag counts + +If the output is in BED format, it has the following columns:: + + Column Description + ------------ -------------------------------------------------------- + 1 chrom Chromosome of the peak + 2 chromStart Start position of the peak + 3 chromEnd End position of the peak + 4 name Always "MOSAiCS_peak" + 5 score Averaged ChIP tag counts of the peak + +If the output is in GFF format, it has the following columns:: + + Column Description + --------- -------------------------------------------------------- + 1 seqname Chromosome of the peak + 2 source Always "MOSAiCS" + 3 feature Always "MOSAiCS_peak" + 4 start Start position of the peak + 5 end End position of the peak + 6 score Averaged ChIP tag counts of the peak + 7 strand Always "." + 8 frame Always "." + 9 group Always "." + +------ + +**Reports for diagnostics** + +*Summary of model fitting and peak calling*: This report provides information about input and output files, parameter settings used for model fitting and peak calling, and brief summary of peak calling results. + +*Goodness of fit (GOF) plots*: This report allows visual comparisons of the fits of the background, one-signal-component, and two-signal-component models with the actual data. + +*Plots of exploratory analysis*: This report provides the histograms of ChIP and control samples and the scatter plots of ChIP versus control tag counts. + +More details regarding these reports can be found here_: + +------ + +**Settings for model fitting and peak calling** + +More details about the tuning of these parameters can be found here_: + +.. _here: http://www.bioconductor.org/packages/2.11/bioc/vignettes/mosaics/inst/doc/mosaics-example.pdf + + + diff -r 002dc17c9824 -r ce96e302ee92 mosaics_1.5.4.tar.gz Binary file mosaics_1.5.4.tar.gz has changed diff -r 002dc17c9824 -r ce96e302ee92 mosaics_wrapper.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mosaics_wrapper.pl Thu Jan 10 17:33:09 2013 -0500 @@ -0,0 +1,99 @@ +# Wrapper for MOSAiCS +# Written by Dongjun Chung, Jan. 15, 2013 + +#!/usr/bin/env perl; +use warnings; +use strict; +use File::Temp qw/tempfile/; +use File::Temp qw/tempdir/; +use File::Basename; + +# parse command arguments +# inactive arguments: useChrfile, chrfile, excludeChr +# meaningless argument: analysisType (for later use) + +die "Usage: perl mosaics_wrapper.pl [chip_path] [chip_file_format] [control_path] [control_file_format] [peak_path] [peak_file_format] [analysis_type] [report_summary_path] [report_gof_path] [report_exploratory_path] [PET?] [chromosome-wise?] [fdr_level] [frag_len] [bin_size] [capping] [signal_model] [bg_est_method] [d] [maxgap] [minsize] [thres] [parallel] [n_core]" unless @ARGV == 24; + +my ( $chip_path, $chip_file_format, $control_path, $control_file_format, $peak_path, $peak_file_format, $analysis_type, $report_summary_path, $report_gof_path, $report_exploratory_path, $pet, $by_chr, $fdr_level, $frag_len, $bin_size, $capping, $signal_model, $bg_est_method, $d, $maxgap, $minsize, $thres, $parallel, $n_core ) = @ARGV; + +# parse options: analysis type + +if ( $analysis_type ne "IO" ) { + print "Only 'IO' is supported for analysis type!\n"; + exit 1; +} + + +# parse options: report summary + +my $report_summary = "FALSE"; +if ( $report_summary_path ne "None" ) { + $report_summary = "TRUE"; +} + +# parse options: report GOF + +my $report_gof = "FALSE"; +if ( $report_gof_path ne "None" ) { + $report_gof = "TRUE"; +} + +# parse options: report exploratory analysis + +my $report_exploratory = "FALSE"; +if ( $report_exploratory_path ne "None" ) { + $report_exploratory = "TRUE"; +} + +# write a R scrip to run + +my $tempdir_bin = tempdir(); + +my $cmd = qq| + suppressPackageStartupMessages(library(mosaics)) + try( suppressPackageStartupMessages(library(parallel)), silent=TRUE ) + + mosaicsRunAll( + chipFile="$chip_path", + chipFileFormat="$chip_file_format", + controlFile="$control_path", + controlFileFormat="$control_file_format", + binfileDir="$tempdir_bin", + peakFile="$peak_path", + peakFileFormat="$peak_file_format", + reportSummary=$report_summary, + summaryFile="$report_summary_path", + reportExploratory=$report_exploratory, + exploratoryFile="$report_exploratory_path", + reportGOF=$report_gof, + gofFile="$report_gof_path", + PET=$pet, + byChr=$by_chr, + useChrfile=FALSE, + chrfile=NULL, + excludeChr=NULL, + FDR=$fdr_level, + fragLen=$frag_len, + binSize=$bin_size, + capping=$capping, + bgEst="$bg_est_method", + d=$d, + signalModel="$signal_model", + maxgap=$maxgap, + minsize=$minsize, + thres=$thres, + parallel=$parallel, + nCore=$n_core ) + + q() + |; + +# run R + +open( FT, "| R --slave --vanilla >& /dev/null" ) or die "Couldn't call R!\n"; +print FT $cmd, "\n"; +close FT or die "Couldn't finish R!\n"; + +exit; + +