.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5. .TH MEGADEPTH "1" "July 2022" "megadepth 1.2.0" "User Commands" .SH NAME megadepth \- Quantification of genome coverage by DNA/RNA seqencing .SH DESCRIPTION megadepth 1.2.0 .PP BAM and BigWig utility. .SS "Usage:" .IP megadepth [options] .SH OPTIONS .TP \fB\-h\fR \fB\-\-help\fR Show this screen. .TP \fB\-\-version\fR Show version. .TP \fB\-\-threads\fR # of threads to do: BAM decompression OR compute sums over multiple BigWigs in parallel if the 2nd is intended then a TXT file listing the paths to the BigWigs to process in parallel should be passed in as the main input file instead of a single BigWig file (EXPERIMENTAL). .TP \fB\-\-prefix\fR String to use to prefix all output files. .TP \fB\-\-no\-auc\-stdout\fR Force all AUC(s) to be written to .auc.tsv rather than STDOUT .TP \fB\-\-no\-annotation\-stdout\fR Force summarized annotation regions to be written to .annotation.tsv rather than STDOUT .TP \fB\-\-no\-coverage\-stdout\fR Force covered regions to be written to .coverage.tsv rather than STDOUT .TP \fB\-\-keep\-order\fR Output annotation coverage in the order chromosomes appear in the BAM/BigWig file The default is to output annotation coverage in the order chromosomes appear in the annotation BED file. This is only applicable if \fB\-\-annotation\fR is used for either BAM or BigWig input. .PP BigWig Input: Extract regions and their counts from a BigWig outputting BED format if a BigWig file is detected as input (exclusive of the other BAM modes): .TP Extracts all reads from the passed in BigWig and output as BED format. This will also report the AUC over the annotated regions to STDOUT. If only the name of the BigWig file is passed in with no other args, it will *only* report total AUC to STDOUT. .TP \fB\-\-annotation\fR Only output the regions in this BED applying the argument to \fB\-\-op\fR to them. .TP \fB\-\-op\fR Statistic to run on the intervals provided by \fB\-\-annotation\fR .TP \fB\-\-sums\-only\fR Discard coordinates from output of summarized regions .TP \fB\-\-distance\fR (2200[default]) Number of base pairs between end of last annotation and start of new to consider in the same BigWig query window (a form of binning) for performance. This determines the number of times the BigWig index is queried. .TP \fB\-\-unsorted\fR (off[default]) There's a performance improvement *if* BED file passed to \fB\-\-annotation\fR is 1) sorted by sort \fB\-k1\fR,1 \fB\-k2\fR,2n (default is to assume sorted and check for unsorted positions, if unsorted positions are found, will fall back to slower version) .TP \fB\-\-bwbuffer\fR <1GB[default]> Size of buffer for reading BigWig files, critical to use a large value (~1GB) for remote BigWigs. Default setting should be fine for most uses, but raise if very slow on a remote BigWig. .PP BAM Input: Extract basic junction information from the BAM, including co\-occurrence If only the name of the BAM file is passed in with no other args, it will *only* report total AUC to STDOUT. .TP \fB\-\-fasta\fR Path to the reference FASTA file if a CRAM file is passed as the input file (ignored otherwise) If not passed, references will be downloaded using the CRAM header. .TP \fB\-\-junctions\fR Extract co\-occurring jx coordinates, strand, and anchor length, per read writes to a TSV file .jxs.tsv .TP \fB\-\-all\-junctions\fR Extract all jx coordinates, strand, and anchor length, per read for any jx writes to a TSV file .all_jxs.tsv .TP \fB\-\-longreads\fR Modifies certain buffer sizes to accommodate longer reads such as PB/Oxford. .TP \fB\-\-filter\-in\fR Integer bitmask, any bits of which alignments need to have to be kept (similar to samtools view \fB\-f\fR). .TP \fB\-\-filter\-out\fR Integer bitmask, any bits of which alignments need to have to be skipped (similar to samtools view \fB\-F\fR). .TP \fB\-\-add\-chr\-prefix\fR Adds "chr" prefix to relevant chromosomes for BAMs w/o it, pass "human" or "mouse". Only works for human/mouse references (default: off). .SS "Non-reference summaries:" .TP \fB\-\-alts\fR Print differing from ref per\-base coverages Writes to a CSV file .alts.tsv .TP \fB\-\-include\-softclip\fR Print a record to the alts CSV for soft\-clipped bases Writes total counts to a separate TSV file .softclip.tsv .TP \fB\-\-only\-polya\fR If \fB\-\-include\-softclip\fR, only print softclips which are mostly A's or T's .TP \fB\-\-include\-n\fR Print mismatch records when mismatched read base is N .TP \fB\-\-print\-qual\fR Print quality values for mismatched bases .TP \fB\-\-delta\fR Print POS field as +/\- delta from previous .TP \fB\-\-require\-mdz\fR Quit with error unless MD:Z field exists everywhere it's expected .TP \fB\-\-head\fR Print sequence names and lengths in SAM/BAM header .SS "Coverage and quantification:" .TP \fB\-\-coverage\fR Print per\-base coverage (slow but totally worth it) .TP \fB\-\-auc\fR Print per\-base area\-under\-coverage, will generate it for the genome and for the annotation if \fB\-\-annotation\fR is also passed in Defaults to STDOUT, unless other params are passed in as well, then if writes to a TSV file .auc.tsv .TP \fB\-\-bigwig\fR Output coverage as BigWig file(s). Writes to .bw (also .unique.bw when \fB\-\-min\-unique\-qual\fR is specified). Requires libBigWig. .TP \fB\-\-annotation\fR Path to BED file containing list of regions to sum coverage over (tab\-delimited: chrm,start,end). Or this can specify a contiguous region size in bp. .TP \fB\-\-op\fR Statistic to run on the intervals provided by \fB\-\-annotation\fR .TP \fB\-\-no\-index\fR If using \fB\-\-annotation\fR, skip the use of the BAM index (BAI) for pulling out regions. Setting this can be faster if doing windows across the whole genome. This will be turned on automatically if a window size is passed to \fB\-\-annotation\fR. .TP \fB\-\-min\-unique\-qual\fR Output second bigWig consisting built only from alignments with at least this mapping quality. \fB\-\-bigwig\fR must be specified. Also produces second set of annotation sums based on this coverage if \fB\-\-annotation\fR is enabled .TP \fB\-\-double\-count\fR Allow overlapping ends of PE read to count twice toward coverage .TP \fB\-\-num\-bases\fR Report total sum of bases in alignments processed (that pass filters) .TP \fB\-\-gzip\fR Turns on gzipping of coverage output (no effect if \fB\-\-bigwig\fR is passsed), this will also enable \fB\-\-no\-coverage\-stdout\fR. .SS "Other outputs:" .TP \fB\-\-read\-ends\fR Print counts of read starts/ends, if \fB\-\-min\-unique\-qual\fR is set then only the alignments that pass that filter will be counted here Writes to 2 TSV files: .starts.tsv, .ends.tsv .TP \fB\-\-frag\-dist\fR Print fragment length distribution across the genome Writes to a TSV file .frags.tsv .TP \fB\-\-echo\-sam\fR Print a SAM record for each aligned read .TP \fB\-\-ends\fR Report end coordinate for each read (useful for debugging) .TP \fB\-\-test\-polya\fR Lower Poly\-A filter minimums for testing (only useful for debugging/testing)