Skip to content

1. Docker

carushi edited this page Jun 1, 2018 · 2 revisions

Convert bam files to bed files

Workflow

  1. Install Docker
  2. Pull and run docker image
  3. Copy bam files from your local directory (or mount your local directory)
  4. Run scripts
  5. Copy the results to your directory

Requirement

  • Docker
+ If you don't want to use the docker image and both samtools and bedtools are available locally,
+ you can use script files available at [here](https://github.com/carushi/RT_end_counter).


1. Install Docker

Check here.

2. Pull and run docker image

docker pull carushi/rt_end_counter
docker run -name rtecounter -it carushi/rt_end_counter /bin/bash

3. Copy bam files from your local directory

docker cp host/directory/test.bam rtecounter:/docker/directory/

Or mount your local directory.

4. Run scripts

bash count_and_cov.sh /docker/directory/test.bam (test2.bam test3.bam...)

Then test_cov.bed and test_ctss.bed appear in the directory.

Options:

  • -q (the minimum quality to be remained)
    • Default: 0
    • Reads whose quality is less than qual are filtered.
  • -l (the minimum length to be filtered out)
    • Default: 300
    • Reads whose length is less than lcut are remained.
    • Remove sequencing reads of the maximum length because reads without any truncation cannot detect the probing sites.
  • -k
    • Keep temporary files for any purpose.

5. Copy the results to your local directory

docker cp rtecounter:/docker/directory/filename.bed host/directory/