본문 바로가기
Tools

Mosdepth

by wycho 2021. 3. 22.

Bam file의 depth coverage 를 계산할 때 사용하는 프로그램이다.

 

- Homepage : https://github.com/brentp/mosdepth

- Execute file : https://github.com/brentp/mosdepth/releases

$ wget https://github.com/brentp/mosdepth/releases/download/v0.3.1/mosdepth

 

$ mosdepth -t 4 -b wes.bed output_name input_name
output_name.mosdepth.global.dist.txt
output_name.mosdepth.region.dist.txt
output_name.mosdepth.summary.txt
output_name.regions.bed.gz
output_name.regions.bed.gz.csi
output_name.per-base.bed.gz      # -n
output_name.per-base.bed.gz.csi  # -n

* thread를 4 이상 설정해도 최대 4 threads 가 사용된다.

* bed 파일을 준비할 때, 0-base 인지 1-base 인지 확인이 필요하다.

# 0-base 인 경우
#CHROM	START	END
chr1	0	1	# 1번 포지션

 

mosdepth 0.3.1

  Usage: mosdepth [options] <prefix> <BAM-or-CRAM>

Arguments:

  <prefix>       outputs: `{prefix}.mosdepth.dist.txt`
                          `{prefix}.mosdepth.summary.txt`
                          `{prefix}.per-base.bed.gz` (unless -n/--no-per-base is specified)
                          `{prefix}.regions.bed.gz` (if --by is specified)
                          `{prefix}.quantized.bed.gz` (if --quantize is specified)
                          `{prefix}.thresholds.bed.gz` (if --thresholds is specified)

  <BAM-or-CRAM>  the alignment file for which to calculate depth.

Common Options:

  -t --threads <threads>     number of BAM decompression threads [default: 0]
  -c --chrom <chrom>         chromosome to restrict depth calculation.
  -b --by <bed|window>       optional BED file or (integer) window-sizes.
  -n --no-per-base           dont output per-base depth. skipping this output will speed execution
                             substantially. prefer quantized or thresholded values if possible.
  -f --fasta <fasta>         fasta file for use with CRAM files [default: ].
  --d4                       output per-base depth in d4 format.

Other options:

  -F --flag <FLAG>              exclude reads with any of the bits in FLAG set [default: 1796]
  -i --include-flag <FLAG>      only include reads with any of the bits in FLAG set. default is unset. [default: 0]
  -x --fast-mode                dont look at internal cigar operations or correct mate overlaps (recommended for most use-cases).
  -q --quantize <segments>      write quantized output see docs for description.
  -Q --mapq <mapq>              mapping quality threshold. reads with a quality less than this value are ignored [default: 0]
  -T --thresholds <thresholds>  for each interval in --by, write number of bases covered by at
                                least threshold bases. Specify multiple integer values separated
                                by ','.
  -m --use-median               output median of each region (in --by) instead of mean.
  -R --read-groups <string>     only calculate depth for these comma-separated read groups IDs.
  -h --help                     show help

 

 

 

 

 

'Tools' 카테고리의 다른 글

Nextflow for pipelines  (0) 2021.05.05
DRAGEN  (0) 2021.04.22
CrossMap  (0) 2021.03.20
DeepVariant  (0) 2021.01.18
docker  (0) 2021.01.18

댓글