GenomeRIK / tama

Transcriptome Annotation by Modular Algorithms (for long read RNA sequencing data)
GNU General Public License v3.0
125 stars 24 forks source link

python3.11,NameError: name 'xrange' is not defined. Did you mean: 'range'? #124

Closed tky199996 closed 6 months ago

tky199996 commented 7 months ago

Hello, I am using the python version that makes 3.11, but it seems that the tama_collapse.py file does not support python 3.11 and keeps showing module errors, what should I do? Is there any tama software that can support Python 3.11? I don't know how to email you, I'm sorry

tky199996 commented 7 months ago

You can use pull requests, the python3 version. But you need edit the python script head from * import __version__, from __init__ import __version__ this way is right.

jamestwebber:py3 tama_collpase.py

from __init__ import __version__

Thank you very much. I modified it according to your method and I ran it successfully, but I got two empty files, the bed file and the read.bed file. What is the problem? Thanks again for helping me! 微信图片_20240122165124

tky199996 commented 7 months ago

You can use pull requests, the python3 version. But you need edit the python script head from * import __version__, from __init__ import __version__ this way is right. jamestwebber:py3 tama_collpase.py

from __init__ import __version__

Thank you very much. I modified it according to your method and I ran it successfully, but I got two empty files, the bed file and the read.bed file. What is the problem? Thanks again for helping me! 微信图片_20240122165124

微信图片_20240122165735 It looks like there is still a module error

tky199996 commented 7 months ago

您可以使用pull requestspython3 版本。但是你需要编辑python脚本头from * import __version__from __init__ import __version__这种方式是正确的。 jamestwebber:py3 tama_collpase.py

from __init__ import __version__

非常感谢。我按照你的方法修改了一下,运行成功了,但是得到了两个空文件,bed文件和read.bed文件。问题是什么?再次感谢您对我的帮助!微信图片_20240122165124

微信图片_20240122165735看来还是有模块错误

在启动脚本之前,您需要使用 minimap2 将您的fastq文件映射到reference fastafile,它将生成一个sam文件。我只是猜测你的问题是由非法sam文件作为输入文件引起的。 I am using the bam file obtained by pbmm2, pbmm2 align --preset ISOSEQ \ --unmapped \ --sort \ -j 20 \ --log-level INFO --log-file pbmm2.log \ ../12.ref/genome.fa \ --sample T_LR \ ../23.fl2flnc/T_LR.flnc.bam T_LR.bam This is my basic parameter, through which I get the compared bam file. Do you suggest that I use the sam file as input, or how can I check whether my bam file is wrong?

tky199996 commented 7 months ago

这个工具对 bam 文件不支持,作者没有对那块维护了,你可以用 samtools 工具对bam文件进行转换 Oh, that’s it, thanks for your help!

tky199996 commented 7 months ago

这个工具对 bam 文件不支持,作者没有对那块维护了,你可以用 samtools 工具对bam文件进行转换 Oh, that’s it, thanks for your help! 1 Hello, I'm currently using tama_convert_bed_gtf_ensembl_no_cds.py to convert, but it looks like an error has occurred as well, thank you again for helping me, thank you!

tky199996 commented 7 months ago

TAMA Tools are more suitable for data analysis with similar workflows. I recommend you use some common tools to implement your needs, such as:

  1. Download the reference genome and gtf files from Ensembl.
  2. Use Python or R to filter the no_cds tags of the gtf files and write the data into bed files.
  3. Use the seqkit grep command and bed files in the seqkit tool to extract the reference genome.
  4. Use pbmm2 or minimap2 tools to align your sequencing sequences with the extracted reference genome file.
  5. You can further use paftools.js sam2paf to convert the sam file into a more readable paf file.

Good luck!

Thank you for your help, I will try the process you provided.

tky199996 commented 7 months ago

TAMA工具更适合具有类似工作流程的数据分析。我建议您使用一些常用工具来实现您的需求,例如:

  1. 从 Ensembl下载参考基因组和gtf文件。
  2. 使用PythonR过滤文件no_cds的标签gtf并将数据写入bed文件。
  3. 使用工具seqkit grep中的命令和bed文件seqkit提取参考基因组。
  4. 使用pbmm2minimap2工具将测序序列与提取的参考基因组文件进行比对。
  5. 您可以进一步使用paftools.js sam2pafsam文件转换为更具可读性的paf文件。

祝你好运! Thank you, I think it may be a problem with the python version. When using the tama_collapse.py script, you should use the python3.11 version and need to modify it according to the method you provided before. When using the tama_convert_bed_gtf_ensembl_no_cds.py script, you still need to switch to python2.7 version for conversion. Thanks for your help, thank you again!

tky199996 commented 6 months ago

TAMA工具更适合具有类似工作流程的数据分析。我建议您使用一些常用工具来实现您的需求,例如:

  1. 从 Ensembl下载参考基因组和gtf文件。
  2. 使用PythonR过滤文件no_cds的标签gtf并将数据写入bed文件。
  3. 使用工具seqkit grep中的命令和bed文件seqkit提取参考基因组。
  4. 使用pbmm2minimap2工具将测序序列与提取的参考基因组文件进行比对。
  5. 您可以进一步使用paftools.js sam2pafsam文件转换为更具可读性的paf文件。

祝你好运!

Hello, when I run tama_merge.py using python3.11, the following error occurs. How can I solve it? 截屏3