老师我在构建泛基因列表,合成last.txt文件,结果只有两列

老师,按照您给的指令(for i in `find ../01.jcvi -name "pangene_filter.*.last"`;do

    name=`basename ${i} | cut -d "." -f2`;

    grep -v "^#" ${i} > ${name}.last;

    python3 $script/find_1vs1_v2.py ${name}.last ${name}.txt && /bin/rm ${name}.last;

Done

cat *.txt > last.txt)合成last.txt,为什么和课程里老师的不一样呢,另外,用我的继续下一步# 保留相似度100以及基因之间的最佳匹配

python3 $script/find_1vs1_v2.py last.txt 1vs1.txt结果显示错误:Traceback (most recent call last):

File "/work/script/find_1vs1_v2.py", line 36, in <module> find_max_third_column(args.input_file, args.output_file) File "/work/script/find_1vs1_v2.py", line 13, in find_max_third_column third_col_value = float(row[2]) # 假设第三列是数值 IndexError: list index out of rang

我的结果是这样attachments-2025-03-8fkHDr0f67c9a2a4c476d.png

老师是这样

attachments-2025-03-F0YyUYOB67c9a2bf02294.png

请先 登录 后评论

1 个回答

Ti Amo

是的,经过python处理之后的结果确实只有两列。你可以不做python3 $script/find_1vs1_v2.py last.txt 1vs1.txt,直接把现在的last.txt作为1vs1.txt继续往下走就可以了。

如果想要执行python3 $script/find_1vs1_v2.py last.txt 1vs1.txt需要多几步的linux操作,不是很有必要。

请先 登录 后评论