xbinbzy的个人博客分享 http://blog.sciencenet.cn/u/xbinbzy

博文

MOCAT2使用过程中遇到的坑

已有 4643 次阅读 2017-6-30 19:25 |个人分类:数据分析|系统分类:科研笔记| MOCAT2

最近利用MOCAT2处理metagenome数据,在功能注释时遇到两个坑,记录分享一下

1)make_gene_catalog时,处理数据时发现step.4.seeds.padded没有结果

   1.1 查看源码

cut -f 2,3,4,5,6,7 step.4.to.grep | $MC_BIN/cdbyank step.3.scaftigs.cidx -R -Q -x > step.4.seeds.padded

   1.2 查看工具cdbyank的readme,要求geneid是整数

   1.3 文件step.4.to.grep的结果2_1,2_2,意识到问题所在,是step.4.to.grep的格式存在问题

   1.4修改make_gene_catalog.sh中的代码,最终修改成

grep '>' step.2.filtered.seeds | perl -lane 'm/>(\S+)_gene(\S+)_(\S+) strand:([+-]) start:(\d+) stop:(\d+) length:(\d+) start_codon:([a-z]+) stop_codon:([a-z]+) gene_type:([a-z]*)/; $name="$1_$2"; $geneID=$3; $gene="$1_gene$2_$3"; $length=$7; $start=$5; $stop=$6; $strand=$4; $newstart = $start - 100; if ( $newstart < 1 ) { $newstart = 1; }; $newstop = $stop + 100; $pos_start = $start - $newstart + 1; $pos_stop = $pos_start + $length - 1; print "$gene\t$name\t$newstart\t$newstop\t$geneID\t$pos_start\t$pos_stop"' > step.4.to.grep &&

    1.5 重新运行,结果正常输出


2)annotate_gene_catalog时,发现报错读不到数据库的文件

    2.1 查看源码,

for DB in `ls $MC_MOD/data/*.HMM $MC_MOD/data/*.DIAMOND 2>/dev/null | cut -f 2 -d'-'`

do

DB2=`echo $DB | cut -f 1 -d'.'` &&

HMM=`echo $DB | grep -c HMM` &&

sleep 2

    2.2 意识对文件的切割以"-"和"."进行,对数据库路径进行检查发现存在"01.in-*"的目录名

    2.3 将数据库放置路径重新修改,结果正常输出



https://blog.sciencenet.cn/blog-306699-1063879.html

上一篇:饮食调节体重、生理和心理状态
下一篇:Latex使用overpic设置背景图片
收藏 IP: 120.237.96.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (3 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-25 09:30

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部