In [5]:
ls analyses/2016-10-11
In [13]:
ls -lh /Volumes/caviar/wd/2016-10-11/bsmap*sam
In [ ]:
In [14]:
bsmaploc="/Applications/bioinfo/BSMAP/bsmap-2.74/"
In [15]:
cd /Volumes/caviar/wd/2016-10-11/
In [16]:
for i in ("1_ATCACG","2_CGATGT","3_TTAGGC","4_TGACCA","5_ACAGTG","6_GCCAAT","7_CAGATC","8_ACTTGA"):
!python {bsmaploc}methratio.py \
-d ../data/Ostrea_lurida.scafSeq \
-u -z -g \
-o methratio_out_{i}.txt \
-s {bsmaploc}samtools \
bsmap_out_{i}.sam \
In [18]:
#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 ("1_ATCACG","2_CGATGT","3_TTAGGC","4_TGACCA","5_ACAGTG","6_GCCAAT","7_CAGATC","8_ACTTGA"):
!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 [46]:
#maybe we need to ignore case
In [51]:
!md5 mkfmt_M2.txt mkfmti_M2.txt | head
In [52]:
#nope
In [19]:
!head -5 mkfmt*
In [22]:
cd git-repos/sr320.github.io/jupyter/
In [23]:
ls
In [24]:
mkdir analyses/$(date +%F)
In [25]:
for i in ("1_ATCACG","2_CGATGT","3_TTAGGC","4_TGACCA","5_ACAGTG","6_GCCAAT","7_CAGATC","8_ACTTGA"):
!cp /Volumes/caviar/wd/2016-10-11/mkfmt_{i}.txt analyses/$(date +%F)/mkfmt_{i}.txt
In [26]:
!head analyses/$(date +%F)/*
url for 8 tables..
https://github.com/sr320/sr320.github.io/tree/master/jupyter/analyses/2016-10-22
In [ ]: