Coder Social home page Coder Social logo

bamdst's Introduction

bamdst -- a BAM Depth Stat Tool

Bamdst is a lightweight tool to stat the depth coverage of target regions of bam file(s).

Bam file(s) should be properly sorted, and the probe file (bed file) and the output dir

must be specified in the first place.

USAGE

Normal:

bamdst -p <probe.bed> -o ./ in1.bam

Pipeline mode:

samtools view in1.bam -u | bamdst -p x.bed -o ./ -

PARAMETERS

-o / --outdir [dir]

set the output dir [mandatory]

-p / --bed [file]

the probe or captured target region file, these regions will be merged first [mandatory]

OPTIONAL PARAMETERS

-f / --flank [num]

if you want calculate the coverage of flank region, set this value, default is 200

--maxdepth [num]

for some projects, the depths of sepcial region are very high, if you don't want show

these unnormal depths in cumulation distrbution file, set the cutoff value to filter them.

default is 0 (no filter).

--cutoffdepth [num]

for some projects, people care about the coverage of specified depth, like 10000x etc.

bamdst just calculate the coverage of 0x, 4x, 10x, 30x, 100x, so you can set this value

to show the specified coverage in the coverage.report file. Default is 0.

--isize [num]

for bad mapped paired reads, the inferred insert size is very huge. So set a cutoff

value for reasonal visual purpose. Default is 2000.

--uncover [num]

set this cutoff value for calculate the bad covered region. Default is <5.

--use_rmdup (an invalid parament since v1.0.0 )

Use rmdup depth instead of cover depth to calculate the coverage of target regions and

so on.

OUTPUT FILES

Seven files will be created in the output direction. There are:

-coverage.report

-cumu.plot

-insert.plot

-chromosome.report

-region.tsv.gz

-depth.tsv.gz

-uncover.bed

DETAILS of each file

coverage.report

This file contains all the coverage information of target and

flank region, and reads stat information of the input file(s).

Here is the full details of each entry.

 [Total] Raw Reads (All reads) // All reads in the bam file(s).
 [Total] QC Fail reads // Reads number failed QC, this flag is marked by other software,like bwa. See flag in the bam structure.
 [Total] Raw Data(Mb) // Total reads data in the bam file(s).
[Total] Paired Reads // Paired reads numbers.
[Total] Mapped Reads // Mapped reads numbers.
[Total] Fraction of Mapped Reads // Ratio of mapped reads against raw reads.
[Total] Mapped Data(Mb) // Mapped data in the bam file(s).
[Total] Fraction of Mapped Data(Mb) // Ratio of mapped data against raw data.
[Total] Properly paired // Paired reads with properly insert size. See bam format protocol for details.
[Total] Fraction of Properly paired // Ratio of properly paired reads against mapped reads
[Total] Read and mate paired // Read (read1) and mate read (read2) paired.
[Total] Fraction of Read and mate paired // Ratio of read and mate paired against mapped reads
[Total] Singletons // Read mapped but mate read unmapped, and vice versa.
[Total] Read and mate map to diff chr // Read and mate read mapped to different chromosome, usually because mapping error and structure variants.
[Total] Read1 // First reads in mate paired sequencing
[Total] Read2 // Mate reads
[Total] Read1(rmdup) // First reads after remove duplications.
[Total] Read2(rmdup) // Mate reads after remove duplications.
[Total] forward strand reads // Number of forward strand reads.
[Total] backward strand reads // Number of backward strand reads.
[Total] PCR duplicate reads // PCR duplications.
[Total] Fraction of PCR duplicate reads // Ratio of PCR duplications.
[Total] Map quality cutoff value // Cutoff map quality score, this value can be set by -q. default is 20, because some variants caller like GATK only consider high quality reads.
[Total] MapQuality above cutoff reads // Number of reads with higher or equal quality score than cutoff value.
[Total] Fraction of MapQ reads in all reads // Ratio of reads with higher or equal Q score against raw reads.
[Total] Fraction of MapQ reads in mapped reads // Ratio of reads with higher or equal Q score against mapped reads.
[Target] Target Reads // Number of reads covered target region (specified by bed file).
[Target] Fraction of Target Reads in all reads // Ratio of target reads against raw reads.
[Target] Fraction of Target Reads in mapped reads // Ratio of target reads against mapped reads.
[Target] Target Data(Mb) // Total bases covered target region. If a read covered target region partly, only the covered bases will be counted.
[Target] Target Data Rmdup(Mb) // Total bases covered target region after remove PCR duplications. 
[Target] Fraction of Target Data in all data // Ratio of target bases against raw bases.
[Target] Fraction of Target Data in mapped data // Ratio of target bases against mapped bases.
[Target] Len of region // The length of target regions.
[Target] Average depth // Average depth of target regions. Calculated by "target bases / length of regions".
[Target] Average depth(rmdup) // Average depth of target regions after remove PCR duplications.
[Target] Coverage (>0x) // Ratio of bases with depth greater than 0x in target regions, which also means the ratio of covered regions in target regions.
[Target] Coverage (>=4x) // Ratio of bases with depth greater than or equal to 4x in target regions.
[Target] Coverage (>=10x) // Ratio of bases with depth greater than or equal to 10x in target regions.
[Target] Coverage (>=30x) // Ratio of bases with depth greater than or equal to 30x in target regions.
[Target] Coverage (>=100x) // Ratio of bases with depth greater than or equal to 100x in target regions.
[Target] Coverage (>=Nx) // This is addtional line for user self-defined cutoff value, see --cutoffdepth
[Target] Target Region Count // Number of target regions. In normal practise,it is the total number of exomes.
[Target] Region covered > 0x // The number of these regions with average depth greater than 0x.
[Target] Fraction Region covered > 0x // Ratio of these regions with average depth greater than 0x.
[Target] Fraction Region covered >= 4x // Ratio of these regions with average depth greater than or equal to 4x.
[Target] Fraction Region covered >= 10x // Ratio of these regions with average depth greater than or equal to 10x.
[Target] Fraction Region covered >= 30x // Ratio of these regions with average depth greater than or equal to 30x.
[Target] Fraction Region covered >= 100x // Ratio of these regions with average depth greater than or equal to 100x.
[flank] flank size // The flank size will be count. 200 bp in default. Oligos could also capture the nearby regions of target regions.
[flank] Len of region (not include target region) // The length of flank regions (target regions will not be count).
[flank] Average depth // Average depth of flank regions.
[flank] flank Reads // The total number of reads covered the flank regions. Note: some reads covered the edge of target regions, will be count in flank regions also. 
[flank] Fraction of flank Reads in all reads // Ratio of reads covered in flank regions against raw reads.
[flank] Fraction of flank Reads in mapped reads // Ration of reads covered in flank regions against mapped reads.
[flank] flank Data(Mb) // Total bases in the flank regions.
[flank] Fraction of flank Data in all data // Ratio of total bases in the flank regions against raw data.
[flank] Fraction of flank Data in mapped data // Ratio of total bases in the flank regions against mapped data.
[flank] Coverage (>0x) // Ratio of flank bases with depth greater than 0x.
[flank] Coverage (>=4x) // Ratio of flank bases with depth greater than or equal to 4x.
[flank] Coverage (>=10x) // Ratio of flank bases with depth greater than or equal to 10x.
[flank] Coverage (>=30x) // Ratio of flank bases with depth greater than or equal to 30x.

cumu.plot

Depth distrbution for plot.

insert.plot

Inferred insert size distribution for plot.

chromosome.report

Depth and coverage information of each chromosome.

region.tsv.gz

For each region in probe file (in.bed), average depth, median

depth and coverage of these regions will be listed in the file.

depth.tsv.gz

For each position in the probe file(in.bed), three kinds depth

value will be calculated, including raw depth, rmdup depth and

the coverage depth. The raw depth is retrieved from input bam

file(s) without any restriction. And the rmdup depth is

calculated after remove duplicated reads and secondary alignment

reads and low map quality reads(mapQ < 20), this value is similar

with the output depth of samtools depth. The coverage depth is

the raw depth with consider of deletion region, so this value

should be equal to or greated than the raw depth. We usw raw depth

to stat the coverage information in the coverage.report file. If

you want use rmdup depth to calculate the coverage, please use

the parameter "--use_rmdup".

uncover.bed

This bed file contains the bad covered or uncovered region in the

input bam file(s) against the probe file. Set the cutoff value of

uncover by parameter "--uncover"

bamdst's People

Contributors

biolxy avatar liuyinzhe avatar shiquan avatar tfmorris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bamdst's Issues

make error

hi,When I installed bamdst,I get this error:
$ make

rm -fr gmon.out *.o a.out *.exe *.dSYM bamdst *~ *.a target.dep *.plot *.report *.tsv.gz uncover.bed
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. bgzf.c -o bgzf.o
bgzf.c: In function ‘bgzf_close’:
bgzf.c:435:18: warning: variable ‘count’ set but not used [-Wunused-but-set-variable]
435 | int ret, count, block_length;
| ^~~~~
bgzf.c: In function ‘bgzf_check_EOF’:
bgzf.c:59:34: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
59 | #define _bgzf_read(fp, buf, len) fread(buf, 1, len, fp)
| ^~~~~~~~~~~~~~~~~~~~~~
bgzf.c:467:9: note: in expansion of macro ‘_bgzf_read’
467 | _bgzf_read(fp->fp, buf, 28);
| ^~~~~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. kstring.c -o kstring.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_aux.c -o bam_aux.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam.c -o bam.o
In file included from /usr/include/string.h:495,
from samlib/bam.h:47,
from samlib/bam.c:5:
In function ‘strncpy’,
inlined from ‘bam_header_write’ at samlib/bam.c:128:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_import.c -o bam_import.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_index.c -o bam_index.o
samlib/bam_index.c: In function ‘bam_index_core’:
samlib/bam_index.c:178:42: warning: overflow in conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘int32_t’ {aka ‘int’} changes value from ‘last_bin = 4294967295’ to ‘-1’ [-Woverflow]
178 | save_bin = save_tid = last_tid = last_bin = 0xffffffffu;
| ^~~~~~~~
samlib/bam_index.c: In function ‘bam_index_load_core’:
samlib/bam_index.c:335:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
335 | fread(magic, 1, 4, fp);
| ^~~~~~~~~~~~~~~~~~~~~~
samlib/bam_index.c:342:9: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
342 | fread(&idx->n, 4, 1, fp);
| ^~~~~~~~~~~~~~~~~~~~~~~~
samlib/bam_index.c:355:17: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
355 | fread(&size, 4, 1, fp);
| ^~~~~~~~~~~~~~~~~~~~~~
samlib/bam_index.c:358:25: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
358 | fread(&key, 4, 1, fp);
| ^~~~~~~~~~~~~~~~~~~~~
samlib/bam_index.c:362:25: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
362 | fread(&p->n, 4, 1, fp);
| ^~~~~~~~~~~~~~~~~~~~~~
samlib/bam_index.c:366:25: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
366 | fread(p->list, 16, p->n, fp);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
samlib/bam_index.c:376:17: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
376 | fread(&index2->n, 4, 1, fp);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
samlib/bam_index.c:380:17: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
380 | fread(index2->offset, index2->n, 8, fp);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/sam_header.c -o sam_header.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. bedutil.c -o bedutil.o
bedutil.c: In function ‘regcore_uniq’:
bedutil.c:256:12: warning: variable ‘lastbeg’ set but not used [-Wunused-but-set-variable]
256 | uint32_t lastbeg = 0;
| ^~~~~~~
At top level:
bedutil.c:589:13: warning: ‘bed_view’ defined but not used [-Wunused-function]
589 | static void bed_view(regHash_t *reghash, char *reg)
| ^~~~~~~~
bedutil.c:180:13: warning: ‘reg_destroy’ defined but not used [-Wunused-function]
180 | static void reg_destroy(bedreglist_t *reg, bedvoid_destroy func)
| ^~~~~~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. commons.c -o commons.o
commons.c:3:13: warning: ‘stderr_print’ defined but not used [-Wunused-function]
3 | static void stderr_print(char *format, ...)
| ^~~~~~~~~~~~
ar -csru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o bam_index.o sam_header.o bedutil.o commons.o
ar: u' modifier ignored since D' is the default (see `U')
gcc -g -Wall -O2 -o bamdst bamdst.c -L. -Isamlib/ -I. -lm -lbam -lz
bamdst.c: In function ‘init_loopbams_parameters’:
bamdst.c:663:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
663 | if (outdir) chdir(outdir);
| ^~~~~~~~~~~~~
bamdst.c: In function ‘write_unover_file’:
bamdst.c:821:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
821 | if (outdir) chdir(outdir);
| ^~~~~~~~~~~~~
bamdst.c: In function ‘load_bamfiles’:
bamdst.c:837:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
837 | if (outdir) chdir(outdir); // FIXME: if there is no such dir?
| ^~~~~~~~~~~~~
bamdst.c: In function ‘print_report’:
bamdst.c:1064:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
1064 | if (outdir) chdir(outdir);
| ^~~~~~~~~~~~~
At top level:
bamdst.c:78:18: warning: ‘WINDOW_SIZE’ defined but not used [-Wunused-const-variable=]
78 | static const int WINDOW_SIZE = 102400;
| ^~~~~~~~~~~

bigger flank reads than expected

Hi Dr.shiquan:
I am using bamdst to calculate exom sequencing enrichment efficiency. I got the the PF(passing filter) reads on flank region is 6868603, it is greatly bigger than my expected size. bamdst command is bamdst -p S07084713_Regions.bed -f 100 -o sample sample.bam. So I recalculate it step-by-step myself. Firstly I use samtools view to count PF reads on target region:samtools view -c -F 2820 -L S07084713_Regions.bed sample.bamthe result is 10352919. Secondely I added 100bp to my bed file using awk:awk '{print $1,$2-100,$3+100}' S07084713_Regions.bed|tr ' ' '\t' >padded.bed. Then samtools view to count PF reads on target +/- 100 bp :samtools view -c -F 2820 -L padded.bed. the result is 11049703. Reads on flank region is 11049703-10352919=696784, lower one order of magnitude than bamdst result. I guess something was uncorrect in my step-by-step flow, but I do not know how to figure out.By the way, according to the bamdst output result in coverage.report, could I get enrichment efficient on target +/- 100bp by ( Target Reads+flank Reads)/Mapped Reads?
best regards
Li'anLin

rmdupdep includes low quality reads below the threshold

Both the documentation here: https://github.com/shiquan/bamdst/blob/master/bamdst.c#L435

  • rmdup depth remove duplication, and only calculate the reads which\n
    are primary mapped and mapQ >= cutoff_mapQ (default 20)\n\

and the internal code comment here: https://github.com/shiquan/bamdst/blob/master/bamdst.c#L155

// clean depth, rmdup, mapQ > 20, primary hit

Indicate that the intention is that low quality reads should be excluded, but the code here:
https://github.com/shiquan/bamdst/blob/master/bamdst.c#L853

doesn't appear to be enforcing that, so that columns is including low quality reads in the coverage calculations.

Segmentation fault (core dumped)

Hi shiquan:
When the following simple script was executed, It crashed and threw Segmentation fault (core dumped).

/opt/bio/bamdst/bamdst -p genome.bed -o sampleA_state sampleA.bam 

I used the Linux Distribution: openSUSE 15.3

image

Is there a bug in bamdst? How can I fix it?

Wish your comments, Thanks!

invalid BAM binary header (this is not a BAM file) using bamdst.

Hi,
I am new using bamdst,and I have a question.When I excute it ,it reported this below,

[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
Segmentation fault (core dumped)

Any advice? Thanks.

how to accelerate the software bamdst

hello, thanks for your Outstanding software,

but I wander is there someway to accelerate the software? I have about 1000 samples to do

and why it can't support CRAM format

make warning

Hi @shiquan ,

I came across a warning when I make this software:

$ make
make: Warning: File 'Makefile' has modification time 585 s in the future
rm -fr gmon.out *.o a.out *.exe *.dSYM  bamdst *~ *.a target.dep *.plot *.report *.tsv.gz uncover.bed
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. bgzf.c -o bgzf.o
bgzf.c: In function ‘bgzf_close’:
bgzf.c:435:11: warning: variable ‘count’ set but not used [-Wunused-but-set-variable]
  int ret, count, block_length;
           ^
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. kstring.c -o kstring.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_aux.c -o bam_aux.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam.c -o bam.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_import.c -o bam_import.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_index.c -o bam_index.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/sam_header.c -o sam_header.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. bedutil.c -o bedutil.o
bedutil.c: In function ‘regcore_uniq’:
bedutil.c:256:12: warning: variable ‘lastbeg’ set but not used [-Wunused-but-set-variable]
   uint32_t lastbeg = 0;
            ^
bedutil.c: At top level:
bedutil.c:180:13: warning: ‘reg_destroy’ defined but not used [-Wunused-function]
 static void reg_destroy(bedreglist_t *reg, bedvoid_destroy func)
             ^
bedutil.c:589:13: warning: ‘bed_view’ defined but not used [-Wunused-function]
 static void bed_view(regHash_t *reghash, char *reg)
             ^
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. commons.c -o commons.o
commons.c:3:13: warning: ‘stderr_print’ defined but not used [-Wunused-function]
 static void stderr_print(char *format, ...)
             ^
/data/xieduo/WES_pipe/pipeline/bin/Miniconda3/envs/gatk_4.2.6.1/bin/x86_64-conda-linux-gnu-ar -csru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o bam_index.o sam_header.o bedutil.o commons.o
gcc -g -Wall -O2  -o bamdst  -L/home/xieduo/lib/curl-7.28.0/lib -L/home/xieduo/lib/pcre2-10.39/lib -L/home/xieduo/lib/xz-5.2.5/lib -L/home/xieduo/lib/bzip2-1.0.6/lib -L/home/xieduo/lib/zlib-1.2.11/lib -L/home/xieduo/lib/libpng-1.6.37/lib -L/home/xieduo/lib/openssl-1.1.1n/lib  bamdst.c -L.  -Isamlib/ -I. -lm -lbam -lz
make: warning:  Clock skew detected.  Your build may be incomplete.

How to solve this issue? Thank you.

Best,
Duo

question about long reads

hello,
I wonder if bamdst can perform statistics on aligned BAM files containing long reads, such as BAM files from PacBio.

Looking forward to your reply.
Thanks.

Segmentation fault (core dumped)

Hi, I'm a newer to bamdst. This is a excellent tool. I runned the example file succefully. However, when I runned the following code:
~/software/bamdst$ /home/ug0416/software/bamdst/bamdst -p /home/ug0416/mydata/genome/hg19/hg19_bed/IDTV2.chr.bed -o /home/ug0416/software/bamdst/coverage/ /home/ug0416/mydata/04.mapping/2nd_geneseed_mapping/SCA_876_T.sorted.bam
error occurred:
Segmentation fault (core dumped)
bamdst
Hope your repose! Appreciate

make error

hi,When I installed bamdst,I get this error:
$ make
rm -fr gmon.out *.o a.out *.exe *.dSYM bamdst *~ *.a target.dep *.plot *.report *.tsv.gz uncover.bed
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. bgzf.c -o bgzf.o
In file included from bgzf.c:31:0:
bgzf.h:33:10: fatal error: zlib.h: No such file or directory
#include <zlib.h>
^~~~~~~~
compilation terminated.
make: *** [Makefile:29: bgzf.o] Error 1

I check the /usr/include,the zlib.h is exist.How can I solve this problem?

BUG: supplementary mapping is used for reads counting

It seems that bamdst over counting the reads number when there's some supplementary mapping reads in the bam file.

Supplementary reads make some sense for target coverage, but it should not be over counting for "total reads" or "target reads".

what each column of *.plot means

Hi shiquan, I want to use the plot files, but I don't know the meaning of each column in *.plot ,can you explain it. And do you plan to add a tool to generate plottings from the *.plot files directly.Thanks!

about the depth.tsv.gz

hello,
I want to know why the depth.tsv.gz stats depth startint with position 2 instead position 1

thanks !

Installation Error

Hi there, when I tried to install bamdst, I got a lot of warnings:

rm -fr gmon.out *.o a.out *.exe *.dSYM bamdst *~ *.a target.dep *.plot *.report *.tsv.gz uncover.bed
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. bgzf.c -o bgzf.o
bgzf.c:80:1: warning: unused function 'kh_clear_cache' [-Wunused-function]
KHASH_MAP_INIT_INT64(cache, cache_t)
^
./khash.h:601:2: note: expanded from macro 'KHASH_MAP_INIT_INT64'
KHASH_INIT(name, khint64_t, khval_t, 1, kh_int64_hash_func, kh_i...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:215:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_clear
##name(kh
##name##_t *h...
^
:93:1: note: expanded from here
kh_clear_cache
^
1 warning generated.
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. kstring.c -o kstring.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_aux.c -o bam_aux.o
samlib/bam_aux.c:5:1: warning: unused function 'kh_clear_s' [-Wunused-function]
KHASH_MAP_INIT_STR(s, int)
^
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:215:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_clear
##name(kh
##name##_t *h...
^
:88:1: note: expanded from here
kh_clear_s
^
samlib/bam_aux.c:5:1: warning: unused function 'kh_del_s' [-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:341:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_del
##name(kh
##name##_t *h, khint_t x...
^
:102:1: note: expanded from here
kh_del_s
^
samlib/bam_aux.c:6:1: warning: unused function 'kh_init_r2l' [-Wunused-function]
KHASH_MAP_INIT_STR(r2l, str_p)
^
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:204:23: note: expanded from macro '_KHASH_IMPL'
SCOPE kh
##name##t *kh_init##name(void) ...
^
:109:1: note: expanded from here
kh_init_r2l
^
samlib/bam_aux.c:6:1: warning: unused function 'kh_destroy_r2l'
[-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:207:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_destroy
##name(kh
##name##_t *h...
^
:114:1: note: expanded from here
kh_destroy_r2l
^
samlib/bam_aux.c:6:1: warning: unused function 'kh_clear_r2l'
[-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:215:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_clear
##name(kh
##name##_t *h...
^
:117:1: note: expanded from here
kh_clear_r2l
^
samlib/bam_aux.c:6:1: warning: unused function 'kh_get_r2l' [-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:222:16: note: expanded from macro 'KHASH_IMPL'
SCOPE khint_t kh_get
##name(const kh
##name##_t *h, khkey_t key...
^
:120:1: note: expanded from here
kh_get_r2l
^
samlib/bam_aux.c:6:1: warning: unused function 'kh_put_r2l' [-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:299:16: note: expanded from macro 'KHASH_IMPL'
SCOPE khint_t kh_put
##name(kh
##name##_t *h, khkey_t key, int *ret)
^
:126:1: note: expanded from here
kh_put_r2l
^
samlib/bam_aux.c:6:1: warning: unused function 'kh_del_r2l' [-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:341:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_del
##name(kh
##name##_t *h, khint_t x...
^
:131:1: note: expanded from here
kh_del_r2l
^
8 warnings generated.
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam.c -o bam.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_import.c -o bam_import.o
samlib/bam_import.c:18:1: warning: unused function 'kh_clear_ref'
[-Wunused-function]
KHASH_MAP_INIT_STR(ref, uint64_t)
^
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:215:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_clear
##name(kh
##name##_t *h...
^
:99:1: note: expanded from here
kh_clear_ref
^
samlib/bam_import.c:18:1: warning: unused function 'kh_get_ref'
[-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:222:16: note: expanded from macro 'KHASH_IMPL'
SCOPE khint_t kh_get
##name(const kh
##name##_t *h, khkey_t key...
^
:102:1: note: expanded from here
kh_get_ref
^
samlib/bam_import.c:18:1: warning: unused function 'kh_del_ref'
[-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:341:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_del
##name(kh
##name##_t *h, khint_t x...
^
:113:1: note: expanded from here
kh_del_ref
^
3 warnings generated.
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/bam_index.c -o bam_index.o
samlib/bam_index.c:64:1: warning: unused function 'kh_clear_i'
[-Wunused-function]
KHASH_MAP_INIT_INT(i, bam_binlist_t)
^
./khash.h:586:2: note: expanded from macro 'KHASH_MAP_INIT_INT'
KHASH_INIT(name, khint32_t, khval_t, 1, kh_int_hash_func, kh_int...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:215:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_clear
##name(kh
##name##_t *h...
^
:103:1: note: expanded from here
kh_clear_i
^
samlib/bam_index.c:64:1: warning: unused function 'kh_del_i' [-Wunused-function]
./khash.h:586:2: note: expanded from macro 'KHASH_MAP_INIT_INT'
KHASH_INIT(name, khint32_t, khval_t, 1, kh_int_hash_func, kh_int...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:341:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_del
##name(kh
##name##_t *h, khint_t x...
^
:117:1: note: expanded from here
kh_del_i
^
2 warnings generated.
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. samlib/sam_header.c -o sam_header.o
samlib/sam_header.c:9:1: warning: unused function 'kh_clear_str'
[-Wunused-function]
KHASH_MAP_INIT_STR(str, const char *)
^
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:215:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_clear
##name(kh
##name##_t *h...
^
:569:1: note: expanded from here
kh_clear_str
^
samlib/sam_header.c:9:1: warning: unused function 'kh_del_str'
[-Wunused-function]
./khash.h:617:2: note: expanded from macro 'KHASH_MAP_INIT_STR'
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str...
^
./khash.h:358:2: note: expanded from macro 'KHASH_INIT'
KHASH_INIT2(name, static kh_inline, khkey_t, khval_t, kh_is_map...
^
./khash.h:355:2: note: expanded from macro 'KHASH_INIT2'
__KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_fu...
^
./khash.h:341:13: note: expanded from macro 'KHASH_IMPL'
SCOPE void kh_del
##name(kh
##name##_t *h, khint_t x...
^
:583:1: note: expanded from here
kh_del_str
^
2 warnings generated.
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. bedutil.c -o bedutil.o
bedutil.c:178:13: warning: unused function 'reg_destroy' [-Wunused-function]
static void reg_destroy(bedreglist_t *reg, bedvoid_destroy func)
^
bedutil.c:584:13: warning: unused function 'bed_view' [-Wunused-function]
static void bed_view(regHash_t *reghash, char *reg)
^
2 warnings generated.
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DBGZF_CACHE -Isamlib/ -I. commons.c -o commons.o
commons.c:3:13: warning: unused function 'stderr_print' [-Wunused-function]
static void stderr_print(char *format, ...)
^
1 warning generated.
.../envs/wes/bin/x86_64-apple-darwin13.4.0-ar -csru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o bam_index.o sam_header.o bedutil.o commons.o
.../envs/wes/bin/x86_64-apple-darwin13.4.0-ranlib: object: libbam.a(bgzf.o) malformed object (unknown load command 1)
.../envs/wes/bin/x86_64-apple-darwin13.4.0-ar: internal ranlib command failed
make: *** [Makefile:23: libbam.a] Error 1

I don't know how to fix this problem, I hope you can provide some suggestions. Thanks!

What is the meaning of each row.

Hi, I have a question about the output file: coverage.report,
some row confused me and
can I have a file which explain each row stand for?

Many thanks.

specifying more than one --cutoffdepth value

Hi Shiquan!
I am trying to get many coverage for a BAM file. In Bamdst tool we can do this by specifying --cutoffdepth parameter, but I need to get all these coverage in a single coverage.report. How can I get this?
I tried below command but it's giving default coverage such as 0x, 4x, 10x, 30x ,100x along with first specified --cutoffdepth value "50x".

/home//softwares/bamdst-master/bamdst -p /home/packages/SureSelect_Human_All_Exon_V5+UTRs_S04380219_Aglilent/S04380219_Covered.bed -o /home//trial/bam_stat_trial /home/trial.sorted.bam --cutoffdepth 50,40,20

Please help.
Thank you

exit issue

The EXIT_CODE has always been 1, but the result seems like correct.
It's really a chip in porridge, but can be confused somehow.
I hope this can be fixed in the future.

Error ocurrus when use bamdst to stat WGS bam file

Hi, when I use bamdst to stat WGS file, the output file depth.tsv.gz just has the first chrosome result in the region file, and the task is stoped with no error information.How to slove it?

the target region:
chr1 1 254717395
chr2 1 242636919
chr3 1 199957529
chr4 1 191432471
chr5 1 183988138
chr6 1 171967578
chr7 1 158872745
chr8 1 145796002
chr9 1 137877317
chr10 1 134863434
chr11 1 135971833
chr12 1 133770623
chr13 1 105970862
chr14 1 98522907
chr15 1 94829848
chr16 1 90698698
chr17 1 83813795
chr18 1 80489117
chr19 1 62832331
chr20 1 66744663
chr21 1 45247884
chr22 1 50276510
chrX 1 157365100
chrY 1 65593761
chrM 1 16571

the run command:
bamdst -p /ref/CN1.chr.region -1 -o /work/WGS6/ --maxdepth 10000000000 --isize 1000000000 -f 0 /work/WGS6/WGS6.sort.dup.bam

Is the Merging of bed files with respect to strand?

Hi,
I have some gene annotations in bed format, and I would like to calculate the reads coverage use your wonderful bamdst. But since it mandatorily merged region files first, I would split my bed file into several non overlap files. So I was wondering that does the merging in bamdst consider strand information?

best wishes

songtao gui

Multi-genomes

How can I do to get the final report of multi-genomes? Cause I got many bins(MAGs) within several contigs after metabat ,and I want to know the mapping ratio of each MAG. However, the fraction of mapped reads in the coverage-report.txt total ratio, so how can I do to get the ratio of each MAG through one process of blast.

AMP data whitout rmdup but different

## Files : bams/case03.tumor.bam 
                               [Total] Raw Reads (All reads)	23207660
                                       [Total] QC Fail reads	0
                                        [Total] Raw Data(Mb)	2862.87
                                        [Total] Paired Reads	23207660
                                        [Total] Mapped Reads	23204560
                            [Total] Fraction of Mapped Reads	99.99%
                                     [Total] Mapped Data(Mb)	2862.45
                         [Total] Fraction of Mapped Data(Mb)	99.99%
                                     [Total] Properly paired	21198750
                         [Total] Fraction of Properly paired	91.34%
                                [Total] Read and mate paired	23203400
                    [Total] Fraction of Read and mate paired	99.98%
                                          [Total] Singletons	1160
                       [Total] Read and mate map to diff chr	1862132
                                               [Total] Read1	11603830
                                               [Total] Read2	11603830
                                        [Total] Read1(rmdup)	11602187
                                        [Total] Read2(rmdup)	11602373
                                [Total] forward strand reads	11639326
                               [Total] backward strand reads	11565234
                                 [Total] PCR duplicate reads	0
                     [Total] Fraction of PCR duplicate reads	0.00%
                            [Total] Map quality cutoff value	20
                       [Total] MapQuality above cutoff reads	23115868
                 [Total] Fraction of MapQ reads in all reads	99.60%
              [Total] Fraction of MapQ reads in mapped reads	99.62%
                                       [Target] Target Reads	22770967
              [Target] Fraction of Target Reads in all reads	98.12%
           [Target] Fraction of Target Reads in mapped reads	98.13%
                                    [Target] Target Data(Mb)	2723.67
                              [Target] Target Data Rmdup(Mb)	2717.17
                [Target] Fraction of Target Data in all data	95.14%
             [Target] Fraction of Target Data in mapped data	95.15%
                                      [Target] Len of region	14438
                                      [Target] Average depth	188645.84
                               [Target] Average depth(rmdup)	188196.05
                                     [Target] Coverage (>0x)	99.49%
                                    [Target] Coverage (>=4x)	97.78%
                                   [Target] Coverage (>=10x)	95.77%
                                   [Target] Coverage (>=30x)	93.22%
                                  [Target] Coverage (>=100x)	91.06%
                                  [Target] Coverage (>=500x)	87.46%
                                [Target] Target Region Count	88
                                [Target] Region covered > 0x	88
                       [Target] Fraction Region covered > 0x	100.00%
                      [Target] Fraction Region covered >= 4x	100.00%
                     [Target] Fraction Region covered >= 10x	100.00%
                     [Target] Fraction Region covered >= 30x	100.00%
                    [Target] Fraction Region covered >= 100x	100.00%
                   [Target] Fraction Region covered (>=500x)	100.00%
                                          [flank] flank size	200
           [flank] Len of region (not include target region)	48108
                                       [flank] Average depth	56614.38
                                         [flank] flank Reads	22771891
                [flank] Fraction of flank Reads in all reads	98.12%
             [flank] Fraction of flank Reads in mapped reads	98.14%
                                      [flank] flank Data(Mb)	2723.60
                  [flank] Fraction of flank Data in all data	95.14%
               [flank] Fraction of flank Data in mapped data	95.15%
                                      [flank] Coverage (>0x)	40.55%
                                     [flank] Coverage (>=4x)	31.44%
                                    [flank] Coverage (>=10x)	30.21%
                                    [flank] Coverage (>=30x)	29.27%
                                   [flank] Coverage (>=100x)	28.28%
                                   [flank] Coverage (>=500x)	26.29%

I didn't do markdup,so [Total] PCR duplicate reads 0,but i don't know why

                                      [Target] Average depth	188645.84
                               [Target] Average depth(rmdup)	188196.05

mapped reads

Hi,
why mapped reads count differ greatly from the result of samtools view -c -F 4 *.bam. In bamdst, how to get mapped reads?
best regards
Li'anLin

License?

This looks like a cool tool, but I'm unsure what license it's made available under. Some of the C files contain headers with Broad or BGI copyrights and MIT licenses, but others have no headers.

Could you make the license explicit by creating a LICENSE file or some other license statement (after reviewing all the included code to make sure it's compatible, of course).

Thanks!

error 404 Issue installing private repos with devtools

If I follow the installation instructions using install_github("shiquan/bamdst") I get:

install_github("shiquan/bamdst")
Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
Not Found

Did you spell the repo owner (shiquan) and repo name (bamdst) correctly?

  • If spelling is correct, check that you have the required permissions to access the repo.

However, the installation succeeded when I tried another: install_github("tidyverse/ggplot2")
Anyone could have some advice please?

Coverage difference between bamdst and gatk DepthOfCoverage

Does bamdst remove duplicates reads automatically? I first used the "time picard MarkDuplicates REMOVE_DUPLICATES=true" function and calculate the coverage using "gatk DepthOfCoverage" based on removed duplicated bam file. The I used bamdst to calculate the coverage based on unremoved duplicated bam file, because I thought bamdst has the function of remove duplicates. However, bamdst calculated a much more higher coverage(100X) than gatk. How could this happen?

Raw Reads (All reads) are a bit off

bamdst is a good tools, but it has a bit problems.
Raw Reads (All reads) is equal to the result of samtools view $bam | wc -l , not the number of fastq reads. Maybe it Ignored the supplementary alignment.So is the Raw Data(Mb)

Memory Bugs

I met a problem like this:
@@ ERROR ABORT @@
[NeedMEM] trying to allocate 565656160 bytes (limits: 500000000)

And how to deal with it?

multithreading support

Can this program add support for multithreading to speed up analysis,The format is similar to --thread 4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.