Package: cmsip
CMSIP: Hydroxymethylation anlaysis of CMS-IP dataA scalable, accurate, and efficient solution for hydroxymethylation analysis of CMS-IP sequencing data.InstallationCMSIP has been deployed in Bioconda athttps://anaconda.org/bioconda/cmsip. It is encouraged to install CMSIP from Bioconda due to most runtime dependencies will be installed automatically. The following channels should be added in Conda. Namely,conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda install cmsipAlternatively, CMSIP has been also deployed in PyPI athttps://pypi.org/project/cmsip, and it can be installed viapip.pip3 install cmsipIn some cases, users want to build CMSIP manually from source code athttps://github.com/lijinbio/cmsip. Below is an example installation steps.git clone https://github.com/lijinbio/cmsip.git
cd cmsip
python3 setup.py installIn order to run CMSIP after a manual installation, the following dependent software are required.SoftwareURLPython 3https://www.python.orgMatplotlibhttps://matplotlib.orgPyYAMLhttps://pyyaml.orgbedtoolshttps://bedtools.readthedocs.ioR softwarehttps://www.r-project.orgR package DESeq2https://bioconductor.org/packages/release/bioc/html/DESeq2.htmlR package genefilterhttps://bioconductor.org/packages/release/bioc/html/genefilter.htmlR package RVAideMemoirehttps://cran.r-project.org/web/packages/RVAideMemoire/index.htmlGawkhttps://www.gnu.org/software/gawkMOABShttps://github.com/sunnyisgalaxy/moabsDocumentationCMSIP takes in a configuration file for input data and program parameters. CMSIP can be run end-to-end, starting from raw FASTQ files to peak calling and differential hydroxymethylation identification. One can also start the pipeline from intermediate steps. For example, using alignment files as input so that mapping steps will be skipped.Inspection of configurationThe configuration file is in a YAML format. Two example templates areconfig_fastq.yamlandconfig_bam.yamlunderhttps://github.com/lijinbio/cmsip/blob/master/config.config_fastq.yamlis used as a full CMSIP running from FASTQ inputs, whileconfig_bam.yamlis adapted to input existing BAM files so that CMSIP will skip the long-time alignment step. The inspection of configuration is explained below.sampleinfoThe sampleinfo section defines metadata information in analysis. Below metadata information can be specified.ParameterDescriptionsampleinfo.sampleidthe unique identifier to one samplesampleinfo.groupthe biological group of the sample, e.g., KO or WTsampleinfo.filenamesthe absolute path of raw FASTQ filessampleinfo.referencethe absolute path of the reference BAM file whenaligninfo.inputbamis Truesampleinfo.spikeinthe absolute path of the spike-in BAM file whenaligninfo.inputbamandaligninfo.usespikeinis TruegroupinfoThis section defines biological comparisongroup1-group2, e.g., KO - WT.ParameterDescriptiongroupinfo.group1the first group in biological comparisongroupinfo.group2the second group in biological comparisonresultdirThis directory is default working directory storing intemediate result files, such as BAM and BED files.aligninfoThis section specifies parameters used in raw reads alignment.ParameterDescriptionaligninfo.inputbamTrue for BAM inputs. Default: FASTQ inputs.aligninfo.referenceFASTA file of the reference genome, e.g.hg38.fa.aligninfo.usespikeinTrue for spike-in libraries, otherwise False. This option controls the normalization method, either a spike-in normalization using spike-in mapping, or reduced to WIG sum in reference genome.aligninfo.spikeinFASTA file of the spike-in genome, e.g.mm10.fa.aligninfo.statfilethe output statistics file. This file includes quality control statistics as well as estimated normalization factors.aligninfo.barplotinfoa barplot of normalized WIG sums of samples.aligninfo.numthreadsnumber of threads in alignment program.aligninfo.verbosePrint verbose messagegenomescaninfoThis section defines parameters for CMS measurement construction.ParameterDescriptiongenomescaninfo.readextensionTrue to extend reads length before CMS measurement construction.genomescaninfo.fragsizethe fixed fragment size to extend when readextension is True.genomescaninfo.windowfilean intermediate window file with fixed-size genomic regions.genomescaninfo.referencenamethe UCSC genome name to fetch reference genome size. E.g., hg38 or mm10.genomescaninfo.windowsizethe window sizegenomescaninfo.readscountCMS measurement using readcount (True) or mean WIG (False).genomescaninfo.counttablefilethe result count table file.genomescaninfo.verbosePrint verbose messagedhmrinfoParameters in this section is for DMR detection.ParameterDescriptiondhmrinfo.methodThe statistical method used in DHMR detection. Available methods:ttest,chisq,gtest,nbtest,nbtest_sf.ttestis calling Student's t-test to examine the mean difference of CMS measurements between two biological groups.chisqandgtestare Pearson’s Chi-squared and G-test to test if sums of CMS measurements fit the numbers of replicates between two biological condtions.nbtestapplies negative binomial generalized linear model to formulate CMS measurements, and Wald test evaluates the significance of logarithmic fold change. By default, CMS measurement are adjusted by size factors using spike-in normalization. Innbtest_sf, CMS measurements are normalized by the median-ratio algorithm (previously used in DESeq2 for transcriptome measurements).dhmrinfo.meandepthAverage depth to filter out low-depth windows. This step is essential to save computing resources and increase power of downstream statistical inferencedhmrinfo.testfileThe result file with statistical outputs for whole genome windowsdhmrinfo.qthrq-value threshod for DHMW.dhmrinfo.maxdistanceMaximum distance to merge adjacent DHMWs into DHMRsdhmrinfo.dhmrfileThe final DHMR result file after merging adjacent DHMWs.dhmrinfo.numthreadsThe number of threads.dhmrinfo.nsplitThe number of split of windows. This option controls parallelization withdhmrinfo.numthreads.dhmrinfo.verbosePrint verbose message.dhmrinfo.keepNAKeep genome windows ruled out by independent filtering.useinputTo indicate if the input data is used during CMS-IP sequencing.inputinfoIfuseinputis True, this section is required to specify input data. When input data is used, peak windows are identified first by comparing CMS measurements between group 1/2 and their input data. Then, the union of peak windows are tested for DHMR between group 1 and group 2.ParameterDescriptioninputinfo.group1The label for the first group input data.inputinfo.group2The label for the second group input data. Group 1 and group 2 can share same set of input data.inputinfo.methodThe statistical method used in peak calling. Seedhmrinfo.method.inputinfo.qthrq-value threshold for peak calling.inputinfo.testfile1Statistical test results for group 1 peaking calling.inputinfo.dhmrfile1Peak regions for group 1.inputinfo.testfile2Statistical test results for group 2 peaking calling.inputinfo.dhmrfile2Peak regions for group 2.inputinfo.inputfilterfileUnion of peak regions in group 1 and group 2.inputinfo.verbosePrint verbose message.A toy example using BAM inputsTo facilitate the running of CMSIP, a toy example is generated using existing BAM inputs. The example is accessible athttps://github.com/lijinbio/cmsip/blob/master/example. Theexampledirectory consists of running scripts and example BAM files. Below commands will generate the configuration file and run the example.$ ./config.sh ## Generate config.yaml
$ ./fasta.sh ## download the reference genome and the spike-in genome under ./fasta
$ ./run.sh ## run the exampleconfig.shThis script will generate the running configuration file. The inspection of configuration file has been explained above. This example includes small BAM files for 2 KO and 2 WT samples, together with 3 input samples. Spike-in BAM files are also included for spike-in normalization. These BAM files are under the./bamfiledirectory. Thegtestis used for peaking calling and DHMR detection.fasta.shThis script is to download required FASTA file for reference genome and spike-in genome. These FASTA files are used in MCALL for bisulfite conversion ratio (BCR) estimation. FASTA files are downloaded into a local directory./fasta.run.shThe simple command to run CMSIP:$ cmsip -c config.yamlIntermediate and results files are stored under./outdir. The example quality control statistic file (e.g.,qcstats.txt) is as below.sample_idtotalunique_refref/totalunique_spkspk/totalcommcomm/totalcomm/unique_reftwss_spksizefactorstwss_reftwss_ref_normbcr_refbcr_spkT123282328100.00%1416.06%994.25%4.25%30530.52171892886200.0228830.278465T22041420414100.00%278013.62%253912.44%12.44%95220.177049651165320.0334820.178238W115881588100.00%976.11%744.66%4.66%17860.881183121042680.0433170.206362W211821182100.00%897.53%665.58%5.58%15741.0085335853350.0348640.214435I1212212100.00%178.02%41.89%1.89%9921.5915984253620.7385020.811715I2150150100.00%149.33%10.67%0.67%10321.5311586176710.8976330.994475I35252100.00%917.31%00.00%0.00%3564.42205390770.9104940.983871Specifically, thesizefactorscolumn is the size factors generated by spike-in normalization.The example DHMR file is as below.chromstartendbaseMeanlfcstatisticpvaluepadjchr410527610010527640095.88-0.807237545127.637026661.463503254e-072.048904555e-06chr410527250010527270086.7175-0.83738303519.458819011.027921214e-054.796965666e-05chr410525960010525980042.4925-0.53201827735.6820209840.017139614270.03999243329For example, three hypo-DHMRs are identified in chr4 between group T and group W.ContactMaintainer: Jin Li,lijin.abc@gmail.com.
PI: De-Qiang Sun,dsun@tamu.edu.