Skip to content

Commit 58b2443

Browse files
author
Kaushik Ghose
committed
docs: improved bam-to-truth documentation
1. Improved wording 2. Removed figures 3. Moved to Utilities section
1 parent d2f44ff commit 58b2443

File tree

1 file changed

+23
-33
lines changed

1 file changed

+23
-33
lines changed

Diff for: Readme.md

+23-33
Original file line numberDiff line numberDiff line change
@@ -469,38 +469,6 @@ This invocation will process `${BAM}` and summarize the alignment performance in
469469
![Alignment accuracy plots](docs/images/aligner-report-example-2.png?raw=true "Alignment accuracy plots")
470470

471471

472-
## Bam to truth
473-
474-
([Example script](https://github.com/kghosesbg/mitty-demo-data/blob/master/bam-to-truth/bam_to_truth.sh))
475-
```
476-
mitty -v4 debug bam-to-truth ./input.bam 1 sample_name prefix
477-
```
478-
479-
This invocation will process `input.bam` with mapping quality threshold=1, write the outputs as two fastq and one longqname files starting with `prefix` by appendig
480-
`sample_name` into qnames.
481-
482-
`bam-to-truth` is a program that given bam file and mapping quality threshold with sample_name,
483-
the reads having mapping quality above the threshold with their paired mate having mapping quality higher than the threshold are together output .
484-
If no paired mate is found,just outputs the read if mapping quality is above the threshold.The read and it's mate also has to be mapped and be on the same chromosome.
485-
For qname format, please check the section in the appendix.
486-
487-
Sometimes we want to treat the alignment from one aligner (e.g. BWA) as the truth and then check how other aligners do, just for comparison sake.
488-
An ideal tool would do a read by read comparison, and we have some other tools that do this, however, such comparisons
489-
because they need to matchup read qnames, can become expensive. This is a compromise method.
490-
491-
### MQ>=0 alignment analysis
492-
493-
![MQ>=0 MQ](docs/images/mq0.alignment_MQ.png?raw=true)
494-
![MQ>=0 HM](docs/images/mq0.alignment_MQ_hm.png?raw=true)
495-
![MQ>=0 V](docs/images/mq0.alignment_V.png?raw=true)
496-
497-
### MQ>=20 alignment analysis
498-
499-
![MQ>=20](docs/images/mq20.alignment_MQ.png?raw=true)
500-
![MQ>=20 HM](docs/images/mq20.alignment_MQ_hm.png?raw=true)
501-
![MQ>=20 V](docs/images/mq20.alignment_V.png?raw=true)
502-
503-
504472
## Subset a BAM for detailed analysis
505473
([Example script](https://github.com/kghosesbg/mitty-demo-data/blob/master/subset-bam/subset-bam.sh))
506474

@@ -758,9 +726,31 @@ Invoking `mitty simulate-variants --list-models` will list available models
758726
Miscellaneous utilities
759727
-----------------------
760728

729+
## Bam to truth
730+
731+
([Example script](https://github.com/kghosesbg/mitty-demo-data/blob/master/bam-to-truth/bam_to_truth.sh))
732+
733+
Sometimes we want to treat the alignment from one aligner (e.g. BWA) as the truth and then check how other
734+
aligners do relative to that. An ideal tool would do a read by read comparison, and we have some other tools
735+
that do this, however such comparisons, because they need to matchup read qnames, can become expensive.
736+
This is a compromise method.
737+
738+
`bam-to-truth` creates FASTQ file(s) from a BAM file, changing the qname to encode the alignment of the read.
739+
The FASTQ files can then be used like any other simulated FASTQ, to analyze alignment performance for other
740+
aligners relative to the original aligner. The code only writes out reads for which both mates are mapped and
741+
for which both mates have MQ greater than the supplied threshold.
742+
743+
744+
## Variant size distribution
745+
761746
Plot variant size distribution in VCF file:
762747
```
763-
mitty -v4 debug variant-by-size hg001.vcf.gz hg001.variant.size.csv --max-size 100 --title "HG001" --fig-file hg001.variant.png --plot-bin-size 5
748+
mitty -v4 debug variant-by-size \
749+
hg001.vcf.gz hg001.variant.size.csv \
750+
--plot-bin-size 5 \
751+
--max-size 100 \
752+
--title "HG001" \
753+
--fig-file hg001.variant.png
764754
```
765755

766756

0 commit comments

Comments
 (0)