In [4]:
ls analyses/2016-10-11
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [42]:
for i in ("M2","M3"):
!python {bsmaploc}methratio.py \
-d ../data/Crassostrea_gigas.GCAz_000297895.1.dna_sm.toplevel.fa \
-u -z -g \
-o methratio_out_{i}.txt \
-s {bsmaploc}samtools \
bsmap_out_{i}.sam \
In [43]:
!curl https://raw.githubusercontent.com/che625/olson-ms-nb/master/scripts/mr3x.awk \
> /Users/sr320/git-repos/sr320.github.io/jupyter/scripts/mr3x.awk
!curl https://raw.githubusercontent.com/che625/olson-ms-nb/master/scripts/mr_gg.awk.sh \
> /Users/sr320/git-repos/sr320.github.io/jupyter/scripts/mr_gg.awk.sh
In [45]:
#first methratio files are converted to filter for CG context, 3x coverage (mr3x.awk), and reformatting (mr_gg.awk.sh).
#due to issue passing variable to awk, simple scripts were used (included in repository)
for i in ("M2","M3"):
!echo {i}
!grep "[A-Z][A-Z]CG[A-Z]" <methratio_out_{i}.txt> methratio_out_{i}CG.txt
!awk -f /Users/sr320/git-repos/sr320.github.io/jupyter/scripts/mr3x.awk methratio_out_{i}CG.txt \
> mr3x.{i}.txt
!awk -f /Users/sr320/git-repos/sr320.github.io/jupyter/scripts/mr_gg.awk.sh \
mr3x.{i}.txt > mkfmt_{i}.txt
In [47]:
#first methratio files are converted to filter for CG context, 3x coverage (mr3x.awk), and reformatting (mr_gg.awk.sh).
#due to issue passing variable to awk, simple scripts were used (included in repository)
for i in ("M2","M3"):
!echo {i}
!grep -i "[A-Z][A-Z]CG[A-Z]" <methratio_out_{i}.txt> methratio_out_{i}CGi.txt
!awk -f /Users/sr320/git-repos/sr320.github.io/jupyter/scripts/mr3x.awk methratio_out_{i}CGi.txt \
> mr3xi.{i}.txt
!awk -f /Users/sr320/git-repos/sr320.github.io/jupyter/scripts/mr_gg.awk.sh \
mr3xi.{i}.txt > mkfmti_{i}.txt
In [46]:
#maybe we need to ignore case
In [51]:
!md5 mkfmt_M2.txt mkfmti_M2.txt | head
In [52]:
#nope
In [54]:
!head -100 mkfmt_M2.txt
In [56]:
cd /Users/sr320/git-repos/sr320.github.io/jupyter
In [58]:
mkdir analyses
In [59]:
mkdir analyses/$(date +%F)
In [61]:
for i in ("M2","M3"):
!cp /Volumes/caviar/wd/2016-10-11/mkfmt_{i}.txt analyses/$(date +%F)/mkfmt_{i}.txt
In [63]:
!head analyses/$(date +%F)/*
urls
https://raw.githubusercontent.com/sr320/sr320.github.io/master/jupyter/analyses/2016-10-11/mkfmt_M2.txt
https://raw.githubusercontent.com/sr320/sr320.github.io/master/jupyter/analyses/2016-10-11/mkfmt_M3.txt
In [ ]: