Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
updated density calc for CpG
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane J Neph committed May 11, 2023
1 parent 177e04b commit 3a8084d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workflow/scripts/density/cpg-methylation-proportion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ hck -z -F \#ct -F st -F en -F fiber -F ref_5mC ${exp_cpg} \
# ignore last comma
awk 'BEGIN {OFS="\t"} ; { \
lng=split($NF,a,","); \
for(i=2;i<lng;++i) { \
for(i=1;i<lng;++i) { \
if ( a[i] >= 0 ) { \
print $1, a[i], a[i]+1; \
} \
} \
}' ${tmpd}/f \
| sort-bed --max-mem 25G - \
| bedmap --faster --sweep-all --ec --delim "\t" --echo --count ${tmp_ref_cpg} - \
| bedmap --faster --sweep-all --delim "\t" --echo --count ${tmp_ref_cpg} - \
| paste - ${tmpd}/g \
| awk 'BEGIN {OFS="\t"} ; { \
if ( $5 > 0 ) { print $1, $2, $3, $4"/"$5, $4/$5; } \
Expand Down

0 comments on commit 3a8084d

Please sign in to comment.