Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred when Plotting Genes #68

Open
ZJU-Plumber opened this issue Jul 22, 2024 · 0 comments
Open

Error occurred when Plotting Genes #68

ZJU-Plumber opened this issue Jul 22, 2024 · 0 comments

Comments

@ZJU-Plumber
Copy link

Hello, Xiaotao, It's a wonderful tool for enhancer-hijack analysis.
Here is an issue when plot contact maps.

When I plot a contact map using script below:

##########################################################################################
from neoloop.visualize.core import *
import cooler
clr = cooler.Cooler('/public/GongLab/dongy/SV_project/HiC_related_analysis/1.data_shift/Cell/neoloop/Cell_5000.cool')
assembly = 'C28 deletion,12,27127893,+,12,27639555,- 12,26555000 12,28310000'
vis = Triangle(clr, assembly, n_rows=6, figsize=(7, 5.3), track_partition=[5, 0.2, 0.8, 0.8, 0.8,0.8], correct='weight', span=600000, space=0.03)
vis.matrix_plot(vmin=0, vmax=0.08, cbr_fontsize=9)
vis.plot_chromosome_bounds(linewidth=2)
vis.plot_loops('Cell.neo-loops.txt', face_color='none', marker_size=40, cluster=False, filter_by_res=False, onlyneo=True)
vis.plot_genes(filter_=['PPFIBP1'],label_aligns={'PPFIBP1'}, fontsize=9)
vis.plot_signal('H3K27ac', '/public/GongLab/dongy/SV_project/Enhancer/neoloopfinder/3.showcase/Cell/Cell_H3K27ac.bw', label_size=10, data_range_size=9, max_value=20, color='#6A3D9A')
vis.plot_signal('RNA-Seq', '/public/GongLab/dongy/SV_project/Enhancer/neoloopfinder/3.showcase/Cell/Cell_RNA_seq.bw', label_size=10, data_range_size=9, max_value=20, color='#E31A1C')
vis.plot_arcs(lw=1.5, cutoff='top', gene_filter=['PPFIBP1'], arc_color='#666666') # ETV1-related neo-loops
vis.plot_chromosome_bar(name_size=13, coord_size=10, color_by_order=['#1F78B4','#33A02C'])
vis.outfig('Cell_PPFIBP1.png', dpi=300)
##########################################################################################

An error occurred, which was showed below. Can you help me fix this issue? Thanks a lot

##########################################################################################
INFO:pyensembl.download_cache:Fetching /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.97.gtf.gz from URL https://ftp.ensembl.org/pub/release-97/gtf/homo_sapiens/Homo_sapiens.GRCh38.97.gtf.gz
INFO:datacache.download:Downloading https://ftp.ensembl.org/pub/release-97/gtf/homo_sapiens/Homo_sapiens.GRCh38.97.gtf.gz to /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.97.gtf.gz
INFO:pyensembl.download_cache:Fetching /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.cdna.all.fa.gz from URL https://ftp.ensembl.org/pub/release-97/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz
INFO:datacache.download:Downloading https://ftp.ensembl.org/pub/release-97/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz to /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.cdna.all.fa.gz
INFO:pyensembl.download_cache:Fetching /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.ncrna.fa.gz from URL https://ftp.ensembl.org/pub/release-97/fasta/homo_sapiens/ncrna/Homo_sapiens.GRCh38.ncrna.fa.gz
INFO:datacache.download:Downloading https://ftp.ensembl.org/pub/release-97/fasta/homo_sapiens/ncrna/Homo_sapiens.GRCh38.ncrna.fa.gz to /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.ncrna.fa.gz
INFO:pyensembl.download_cache:Fetching /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.pep.all.fa.gz from URL https://ftp.ensembl.org/pub/release-97/fasta/homo_sapiens/pep/Homo_sapiens.GRCh38.pep.all.fa.gz
INFO:datacache.download:Downloading https://ftp.ensembl.org/pub/release-97/fasta/homo_sapiens/pep/Homo_sapiens.GRCh38.pep.all.fa.gz to /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.pep.all.fa.gz
INFO:pyensembl.database:Creating database: /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.97.gtf.db
INFO:pyensembl.database:Reading GTF from /public/groups/dongy/.cache/pyensembl/GRCh38/ensembl97/Homo_sapiens.GRCh38.97.gtf.gz
INFO:root:Extracted GTF attributes: ['gene_id', 'gene_version', 'gene_name', 'gene_source', 'gene_biotype', 'transcript_id', 'transcript_version', 'transcript_name', 'transcript_source', 'transcript_biotype', 'tag', 'transcript_support_level', 'exon_number', 'exon_id', 'exon_version', 'protein_id', 'protein_version', 'ccds_id']
Traceback (most recent call last):
File "/public/GongLab/dongy/SV_project/Enhancer/neoloopfinder/2.get_neoloop/3.TGS_HiC_NGS_RNA_seq_no_filter/OSRC2/plot_figure/2.target_gene/1.plot_PPFIBP1.py", line 10, in
vis.plot_genes(filter_=['PPFIBP1'],label_aligns={'PPFIBP1'}, fontsize=9)
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/neoloop/visualize/core.py", line 485, in plot_genes
genes = Genes(self.bounds, self.orients, self.res, species=species, release=release,
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/neoloop/visualize/bed.py", line 116, in init
ref.index()
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/pyensembl/genome.py", line 280, in index
self.db.connect_or_create(overwrite=overwrite)
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/pyensembl/database.py", line 286, in connect_or_create
return self.create(overwrite=overwrite)
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/pyensembl/database.py", line 239, in create
self._connection = datacache.db_from_dataframes_with_absolute_path(
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/datacache/database_helpers.py", line 176, in db_from_dataframes_with_absolute_path
tables = build_tables(
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/datacache/database_helpers.py", line 136, in build_tables
table = DatabaseTable.from_dataframe(
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/datacache/database_table.py", line 56, in from_dataframe
column_db_type = db_type(values.dtype)
File "/public/groups/dongy/software/miniconda3/envs/neoloop/lib/python3.10/site-packages/datacache/database_types.py", line 96, in db_type
raise ValueError("Failed to find sqlite3 column type for %s" % (
ValueError: Failed to find sqlite3 column type for category

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant