Skip to content

A fast tool to calculate absolute and relative gene body coverage of bulk/single-cell RNA-seq data.

License

Notifications You must be signed in to change notification settings

bioinfo-tsukuba/ReadCoverage.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReadCoverage.jl

ReadCoverage.jl is a fast tool to calculate absolute and relative gene body coverage of bulk/single-cell RNA-seq data.

Installation

pkg> add https://github.com/bioinfo-tsukuba/ReadCoverage.jl

Usage

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"

Read coverage

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)

Absolute genebody coverage

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)

Relative genebody coverage

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)

Variability of Depth of Coverage (VDoC) score

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)

CLI (Commad line interface)

pkg> add ArgParse
julia cli/run.jl relcov <BAM> <BED12> <output_prefix>

Docker

Build Docker image

cd scripts/docker
docker build -t harukao/readcoverage.jl:0.1.3 .

Pull Docker image

The Docker image is available on Docker Hub.

docker pull yuifu/readcoverage.jl:0.1.3

UUse Docker image

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

relcov

docker run yuifu/readcoverage.jl:0.1.2 \
  julia /opt/run.jl relcov <BAM> <BED12> <output_prefix>

vdoccov

docker run yuifu/readcoverage.jl:0.1.2 \
  julia /opt/run.jl vdoc <BED12> <output_prefix> <BAM1> <BAM2> ...

About

A fast tool to calculate absolute and relative gene body coverage of bulk/single-cell RNA-seq data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published