ReadCoverage.jl is a fast tool to calculate absolute and relative gene body coverage of bulk/single-cell RNA-seq data.
pkg> add https://github.com/bioinfo-tsukuba/ReadCoverage.jl
using ReadCoverage
path_bam = "examples/data/RamDA_72h_A09.uniq.q40.bam"
path_bed12 = "examples/data/gencode.vM15.primary_assembly.annotation.protein_coding.head.bed"
out_prefix = "examples/out/RamDA_72h_A09.uniq.q40"
chrom = "chr19"
leftpos = 3205000
rightpos = 3207000
cov = readcoverage_bam(path_bam, chrom, leftpos, rightpos)
cov = readcoverage_bam(path_bam, chrom, leftpos, rightpos, output_prefix=out_prefix)
plot_read_coverage(cov)
abcov = absolute_genebodycoverage(path_bam, path_bed12)
abcov = absolute_genebodycoverage(path_bam, path_bed12, output_prefix=out_prefix, bin_size=100)
plot_absolute_coverage(abcov)
relcov = relative_genebodycoverage(path_bam, path_bed12);
max_depth = 0
relcov = relative_genebodycoverage(path_bam, path_bed12, output_prefix=out_prefix, max_depth=max_depth);
plot_relative_coverage(relcov)
array_path_bam = [
"examples/data/RamDA_72h_A09.uniq.q40.bam",
"examples/data/RamDA_72h_A10.uniq.q40.bam",
"examples/data/RamDA_72h_A11.uniq.q40.bam"
]
path_bed12 = "examples/data/gencode.vM15.primary_assembly.annotation.protein_coding.head.bed"
array_transcript_name, array_transcript_length, array_vdoc = calc_vdoc(array_path_bam, path_bed12)
pkg> add ArgParse
julia cli/run.jl relcov <BAM> <BED12> <output_prefix>
cd scripts/docker
docker build -t harukao/readcoverage.jl:0.1.3 .
The Docker image is available on Docker Hub.
docker pull yuifu/readcoverage.jl:0.1.3
You can run ReadCoverage.jl via CLI.
docker run --rm harukao/readcoverage.jl:0.1.3 -h
docker run --rm harukao/readcoverage.jl:0.1.3 abcov test_data/RamDA_72h_A09.uniq.q40.bam test_data/gencode.vM15.primary_assembly.annotation.protein_coding.head.bed products/test_abcov
docker run yuifu/readcoverage.jl:0.1.2 \
julia /opt/run.jl relcov <BAM> <BED12> <output_prefix>
docker run yuifu/readcoverage.jl:0.1.2 \
julia /opt/run.jl vdoc <BED12> <output_prefix> <BAM1> <BAM2> ...