.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "IPDSUMMARY" 1 "December 2015" "" "" .SH NAME ipdSummary \- Detect DNA base-modifications from kinetic signatures. .SH DESCRIPTION .sp kineticsTool loads IPDs observed at each position in the genome, and compares those IPDs to value expected for unmodified DNA, and outputs the result of this statistical test. The expected IPD value for unmodified DNA can come from either an \fIin\-silico control\fP or an \fIamplified control\fP\&. The in silico control is trained by PacBio and shipped with the package. It predicts predicts the IPD using the local sequence context around the current position. An amplified control dataset is generated by sequencing unmodified DNA with the same sequence as the test sample. An amplified control sample is usually generated by whole\-genome amplification of the original sample. .SS Dependencies .INDENT 0.0 .TP .B kineticsTools depends on: .INDENT 7.0 .IP \(bu 2 pbcore (\fI\%http://github.com/PacificBiosciences/pbcore\fP) .IP \(bu 2 numpy .IP \(bu 2 scipy .UNINDENT .UNINDENT .SS Modification Detection .sp The basic mode of kineticsTools does an independent comparison of IPDs at each position on the genome, for each strand, and emits various statistics to CSV and GFF (after applying a significance filter). .SS Modifications Identification .INDENT 0.0 .TP .B kineticsTools also has a \fIModification Identification\fP mode that can decode multi\-site IPD \(aqfingerprints\(aq into a reduced set of calls of specific modifications. This feature has the following benefits: .INDENT 7.0 .IP \(bu 2 Different modifications occurring on the same base can be distinguished (for example m5C and m4C) .IP \(bu 2 The signal from one modification is combined into one statistic, improving sensitivity, removing extra peaks, and correctly centering the call .UNINDENT .UNINDENT .SH OPTIONS .sp Please call this program with \fB\-\-help\fP to see the available options. .SH ALGORITHM .SS Synthetic Control .sp Studies of the relationship between IPD and sequence context reveal that most of the variation in mean IPD across a genome can be predicted from a 12\-base sequence context surrounding the active site of the DNA polymerase. The bounds of the relevant context window correspond to the window of DNA in contact with the polymerase, as seen in DNA/polymerase crystal structures. To simplify the process of finding DNA modifications with PacBio data, the tool includes a pre\-trained lookup table mapping 12\-mer DNA sequences to mean IPDs observed in C2 chemistry. .SS Filtering and Trimming .sp kineticsTools uses the Mapping QV generated by BLASR or pbmm2 and stored in the alignments or BAM file (or AlignmentSet) to ignore reads that aren\(aqt confidently mapped. The default minimum Mapping QV required is 10, implying that BLASR has \fB90\e%\fP confidence that the read is correctly mapped. Because of the range of readlengths inherent in PacBio dataThis can be changed in using the \-\-mapQvThreshold command line argument, or via the SMRTPortal configuration dialog for Modification Detection. .sp There are a few features of PacBio data that require special attention in order to achieve good modification detection performance. kineticsTools inspects the alignment between the observed bases and the reference sequence \-\- in order for an IPD measurement to be included in the analysis, the PacBio read sequence must match the reference sequence for \fBk\fP around the cognate base. In the current module \fBk=1\fP The IPD distribution at some locus be thought of as a mixture between the \(aqnormal\(aq incorporation process IPD, which is sensitive to the local sequence context and DNA modifications and a contaminating \(aqpause\(aq process IPD which have a much longer duration (mean >10x longer than normal), but happen rarely (~1% of IPDs). Note: Our current understanding is that pauses do not carry useful information about the methylation state of the DNA, however a more careful analysis may be warranted. Also note that modifications that drastically increase the Roughly 1% of observed IPDs are generated by pause events. Capping observed IPDs at the global 99th percentile is motivated by theory from robust hypothesis testing. Some sequence contexts may have naturally longer IPDs, to avoid capping too much data at those contexts, the cap threshold is adjusted per context as follows: capThreshold = max(global99, 5*modelPrediction, percentile(ipdObservations, 75)) .SS Statistical Testing .sp We test the hypothesis that IPDs observed at a particular locus in the sample have a longer means than IPDs observed at the same locus in unmodified DNA. If we have generated a Whole Genome Amplified dataset, which removes DNA modifications, we use a case\-control, two\-sample t\-test. This tool also provides a pre\-calibrated \(aqsynthetic control\(aq model which predicts the unmodified IPD, given a 12 base sequence context. In the synthetic control case we use a one\-sample t\-test, with an adjustment to account for error in the synthetic control model. .SH EXAMPLE USAGE .sp Basic use with BAM input, GFF output: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ipdSummary aligned.bam \-\-reference ref.fasta \-\-identify m6A,m4C \-\-gff basemods.gff .ft P .fi .UNINDENT .UNINDENT .sp With dataset input, methyl fraction calculation and GFF+CSV output: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ipdSummary mapped.alignmentset.xml \-\-reference ref.fasta \-\-identify m6A,m4C \-\-methylFraction \-\-gff basemods.gff \-\-csv kinetics.csv .ft P .fi .UNINDENT .UNINDENT .SH INPUTS .SS Aligned Reads .sp A standard PacBio alignment file \- either AlignmentSet XML or BAM \- containing alignments and IPD information supplies the kinetic data used to perform modification detection. .SS Reference Sequence .sp The tool requires the reference sequence used to perform alignments. This can be either a FASTA file or a ReferenceSet XML. .SH OUTPUTS .sp The modification detection tool provides results in a variety of formats suitable for in\-depth statistical analysis, quick reference, and comsumption by visualization tools such as PacBio SMRTView. Results are generally indexed by reference position and reference strand. In all cases the strand value refers to the strand carrying the modification in DNA sample. Remember that the kinetic effect of the modification is observed in read sequences aligning to the opposite strand. So reads aligning to the positive strand carry information about modification on the negative strand and vice versa, but in this toolkit we alway report the strand containing the putative modification. .sp The following output options are available: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fB\-\-gff FILENAME\fP: GFF format .IP \(bu 2 \fB\-\-csv FILENAME\fP: comma\-separated value format .IP \(bu 2 \fB\-\-bigwig FILENAME\fP: BigWig file (mostly only useful for SMRTView) .UNINDENT .UNINDENT .UNINDENT .sp If you are running base modification analysis through SMRT Link or a pbsmrtpipe pipeline, the GFF, HDF5, and BigWig outputs are automatically generated. .SS modifications.gff .sp The modifications.gff is compliant with the GFF Version 3 specification (\fI\%http://www.sequenceontology.org/gff3.shtml\fP). Each template position / strand pair whose p\-value exceeds the pvalue threshold appears as a row. The template position is 1\-based, per the GFF spec. The strand column refers to the strand carrying the detected modification, which is the opposite strand from those used to detect the modification. The GFF confidence column is a Phred\-transformed pvalue of detection. .sp \fBNote on genome browser compatibility\fP .sp The modifications.gff file will not work directly with most genome browsers. You will likely need to make a copy of the GFF file and convert the _seqid_ columns from the generic \(aqref0000x\(aq names generated by PacBio, to the FASTA headers present in the original reference FASTA file. The mapping table is written in the header of the modifications.gff file in \fB#sequence\-header\fP tags. This issue will be resolved in the 1.4 release of kineticsTools. .sp The auxiliary data column of the GFF file contains other statistics which may be useful downstream analysis or filtering. In particular the coverage level of the reads used to make the call, and +/\- 20bp sequence context surrounding the site. .TS center; |l|l|. _ T{ Column T} T{ Description T} _ T{ seqid T} T{ Fasta contig name T} _ T{ source T} T{ Name of tool \-\- \(aqkinModCall\(aq T} _ T{ type T} T{ Modification type \-\- in identification mode this will be m6A, m4C, or m5C for identified bases, or the generic tag \(aqmodified_base\(aq if a kinetic event was detected that does not match a known modification signature T} _ T{ start T} T{ Modification position on contig T} _ T{ end T} T{ Modification position on contig T} _ T{ score T} T{ Phred transformed p\-value of detection \- this is the single\-site detection p\-value T} _ T{ strand T} T{ Sample strand containing modification T} _ T{ phase T} T{ Not applicable T} _ T{ attributes T} T{ Extra fields relevant to base mods. IPDRatio is traditional IPDRatio, context is the reference sequence \-20bp to +20bp around the modification, and coverage level is the number of IPD observations used after Mapping QV filtering and accuracy filtering. If the row results from an identified modification we also include an identificationQv tag with the from the modification identification procedure. identificationQv is the phred\-transformed probability of an incorrect identification, for bases that were identified as having a particular modification. frac, fracLow, fracUp are the estimated fraction of molecules carrying the modification, and the 5% confidence intervals of the estimate. The methylated fraction estimation is a beta\-level feature, and should only be used for exploratory purposes. T} _ .TE .SS modifications.csv .sp The modifications.csv file contains one row for each (reference position, strand) pair that appeared in the dataset with coverage at least x. x defaults to 3, but is configurable with \(aq\-\-minCoverage\(aq flag to ipdSummary.py. The reference position index is 1\-based for compatibility with the gff file the R environment. Note that this output type scales poorly and is not recommended for large genomes; the HDF5 output should perform much better in these cases. We have preserved the CSV option to support legacy applications but this is no longer produce by the pipelines in SMRT Link/pbsmrtpipe. .SS Output columns .sp \fBin\-silico control mode\fP .TS center; |l|l|. _ T{ Column T} T{ Description T} _ T{ refId T} T{ reference sequence ID of this observation T} _ T{ tpl T} T{ 1\-based template position T} _ T{ strand T} T{ native sample strand where kinetics were generated. \(aq0\(aq is the strand of the original FASTA, \(aq1\(aq is opposite strand from FASTA T} _ T{ base T} T{ the cognate base at this position in the reference T} _ T{ score T} T{ Phred\-transformed pvalue that a kinetic deviation exists at this position T} _ T{ tMean T} T{ capped mean of normalized IPDs observed at this position T} _ T{ tErr T} T{ capped standard error of normalized IPDs observed at this position (standard deviation / sqrt(coverage) T} _ T{ modelPrediction T} T{ normalized mean IPD predicted by the synthetic control model for this sequence context T} _ T{ ipdRatio T} T{ tMean / modelPrediction T} _ T{ coverage T} T{ count of valid IPDs at this position (see Filtering section for details) T} _ T{ frac T} T{ estimate of the fraction of molecules that carry the modification T} _ T{ fracLow T} T{ 2.5% confidence bound of frac estimate T} _ T{ fracUpp T} T{ 97.5% confidence bound of frac estimate T} _ .TE .sp \fBcase\-control mode\fP .TS center; |l|l|. _ T{ Column T} T{ Description T} _ T{ refId T} T{ reference sequence ID of this observation T} _ T{ tpl T} T{ 1\-based template position T} _ T{ strand T} T{ native sample strand where kinetics were generated. \(aq0\(aq is the strand of the original FASTA, \(aq1\(aq is opposite strand from FASTA T} _ T{ base T} T{ the cognate base at this position in the reference T} _ T{ score T} T{ Phred\-transformed pvalue that a kinetic deviation exists at this position T} _ T{ caseMean T} T{ mean of normalized case IPDs observed at this position T} _ T{ controlMean T} T{ mean of normalized control IPDs observed at this position T} _ T{ caseStd T} T{ standard deviation of case IPDs observed at this position T} _ T{ controlStd T} T{ standard deviation of control IPDs observed at this position T} _ T{ ipdRatio T} T{ tMean / modelPrediction T} _ T{ testStatistic T} T{ t\-test statistic T} _ T{ coverage T} T{ mean of case and control coverage T} _ T{ controlCoverage T} T{ count of valid control IPDs at this position (see Filtering section for details) T} _ T{ caseCoverage T} T{ count of valid case IPDs at this position (see Filtering section for details) T} _ .TE .SH SEE ALSO .sp \fBsummarizeModifications\fP(1) .\" Generated by docutils manpage writer. .