Skip to content

2. Bed to reactIDR input

carushi edited this page Jun 1, 2018 · 1 revision

Convert bed files to tab files

When reads are aligned to reference transcripts

Bed + Fasta

  • Base count distribution at RT drop off sites is also available.
python script/bed_to_pars_format.py --offset -1 --fasta fast.fa ctss.bed
# convert read count bed to tab and count the number of each base at modified sites
python script/bed_to_pars_format.py --offset 0 --fasta fast.fa cov.bed
# convert coverage bed to computation

Bed + original Bam

python script/bed_to_pars_format.py --offset -1 --bam temp.bam ctss.bed
python script/bed_to_pars_format.py --offset 0 --bam temp.bam cov.bed

When reads are aligned to a reference genome

Bed + Gtf/Gff (aligned to genome)

python script/bed_to_pars_format.py --offset -1 --gtf temp.gtf ctss.bed
# Count reads at 1nt downstream, written into ctss.bed.tab
python script/bed_to_pars_format.py --offset 0 --gtf temp.gtf cov.bed
# Count reads at an exact positon, written into cov.bed.tab 
  • "exon" features are applied for counting.

Merge replicates

python src/score_converter.py --merge --output control_ctss sample1.ctss.bed.tab sample2.ctss.bed.tab
# merge replicate data (sample1.ctss.bed.tab and sample2.ctss.bed.tab)

Score computation

1. icshape

python src/score_converter.py --score icshape --integrated --print_all --ouput sample \
--coverage case_cov.bed.tab cont_cov.bed.tab --skip_header case_ctss.bed.tab control_ctss.bed.tab
# compute icshape score

2. Ratio score

python src/score_converter.py --score ratio --integrated --print_all --ouput sample \
 --coverage case_cov.bed.tab cont_cov.bed.tab --skip_header case_ctss.bed.tab control_ctss.bed.tab
# compute the coverage ratio score

3. PARS

python src/score_converter.py --score pars --integrated --print_all --ouput sample \
--skip_header case_ctss.bed.tab control_ctss.bed.tab
# compute PARS score