cellranger:如何将 gtf 文件转换为字符串
cellranger: how to convert a gtf file to string
我正在使用 cellranger mkref 并遇到一个奇怪的 python GTF (custome gtf) 问题:
Traceback (most recent call last):
File "/home/user/cellranger-6.0.1/lib/python/cellranger/reference.py", line 750, in validate_gtf
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
File "/home/user/cellranger-6.0.1/external/anaconda/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/home/user/cellranger-6.0.1/external/anaconda/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['gtf_to_gene_index', '/home/user/cellranger-6.0.1/indexes', '/home/user/cellranger-6.0.1/indexes/tmp74f_vsxg.json']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/cellranger-6.0.1/bin/rna/mkref", line 139, in <module>
main()
File "/home/user/cellranger-6.0.1/bin/rna/mkref", line 130, in main
reference_builder.build_gex_reference()
File "/home/user/cellranger-6.0.1/lib/python/cellranger/reference.py", line 613, in build_gex_reference
self.validate_gtf()
File "/home/user/cellranger-6.0.1/lib/python/cellranger/reference.py", line 753, in validate_gtf
raise GexReferenceError("Error detected in GTF file: " + exc.output) from exc
TypeError: can only concatenate str (not "bytes") to str
此外,我有类似的 gtf 文件,cellranger 可以毫无问题地接受它。我比较了这些文件(此外,我从第二个文件制作的第一个文件):
文件 1:text/plain; charset=us-ascii
文件 2:text/plain; charset=us-ascii
此外,我检查了 cat -vE
,文件是相同的
如何更改文件?
提前致谢!
我遇到了同样的问题。问题出在我的 GTF 文件中的重复 ID。删除这些重复项解决了这个问题。请参阅关于 Cellranger GitHub 的讨论:https://github.com/10XGenomics/cellranger/issues/125
我正在使用 cellranger mkref 并遇到一个奇怪的 python GTF (custome gtf) 问题:
Traceback (most recent call last):
File "/home/user/cellranger-6.0.1/lib/python/cellranger/reference.py", line 750, in validate_gtf
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
File "/home/user/cellranger-6.0.1/external/anaconda/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/home/user/cellranger-6.0.1/external/anaconda/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['gtf_to_gene_index', '/home/user/cellranger-6.0.1/indexes', '/home/user/cellranger-6.0.1/indexes/tmp74f_vsxg.json']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/cellranger-6.0.1/bin/rna/mkref", line 139, in <module>
main()
File "/home/user/cellranger-6.0.1/bin/rna/mkref", line 130, in main
reference_builder.build_gex_reference()
File "/home/user/cellranger-6.0.1/lib/python/cellranger/reference.py", line 613, in build_gex_reference
self.validate_gtf()
File "/home/user/cellranger-6.0.1/lib/python/cellranger/reference.py", line 753, in validate_gtf
raise GexReferenceError("Error detected in GTF file: " + exc.output) from exc
TypeError: can only concatenate str (not "bytes") to str
此外,我有类似的 gtf 文件,cellranger 可以毫无问题地接受它。我比较了这些文件(此外,我从第二个文件制作的第一个文件):
文件 1:text/plain; charset=us-ascii
文件 2:text/plain; charset=us-ascii
此外,我检查了 cat -vE
,文件是相同的
如何更改文件? 提前致谢!
我遇到了同样的问题。问题出在我的 GTF 文件中的重复 ID。删除这些重复项解决了这个问题。请参阅关于 Cellranger GitHub 的讨论:https://github.com/10XGenomics/cellranger/issues/125