目标:图1-> 图2:
图一:bismark的输出格式 图二:methylkit的输入文件# 解压
gunzip xxx.CpG_report.txt.gz
# awk:
如图所示awk ' { if ( $4+$5!=0 && $3~/+/) print $1"."$2,$1,$2,"F",$4+$5,sprintf("%.2f", $4/($4+$5)),sprintf("%.2f", 100* $5/($4+$5)); else if ($4+$5!=0 && $3~/-/) print $1"."$2,$1,$2,"R",$4+$5,sprintf("%.2f", 100*$4/($4+$5)),sprintf("%.2f", $5/($4+$5)) }' OFS="\t" WT-2.deduplicated.CpG_report.txt > tmp.txt && sed "1ichrBase\tchr\tbase\tstrand\tcoverage\tfreqC\tfreqT" tmp.txt > WT-2.CpG.pro.txt && rm tmp.txt
# 转载请注明来源
网友评论