Open yojetsharma opened 3 weeks ago
Hi @yojetsharma
Can you provide the full error output please?
All the best,
Seppe
The code in question was run using a different pr_annotation file (i will get back to you on that complete shortly). But the code I tried recently gave the following error (pr_annotation file was the same that is used for pycistopic analysis for this):
from scenicplus.plotting.coverageplot import coverage_plot
scenicplus.plotting.coverageplot.coverage_plot(
scplus_obj,
bw_dict=bw_dict,
region='chr14:100725892-100739224',
meta_data_key='broader_annotation',
pr_consensus_bed=pr_consensus_bed,
pr_gtf=pr_annotation,
genes_violin_plot='DLK1'
)
/home/praghu/yojetsharma/.conda/envs/scenicplus/lib/python3.11/site-packages/pyranges/methods/intersection.py:52: FutureWarning: In a future version, df.iloc[:, i] = newvals
will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either df[df.columns[i]] = newvals
or, if columns are non-unique, df.isetitem(i, newvals)
scdf.loc[:, "Start"] = new_starts
/home/praghu/yojetsharma/.conda/envs/scenicplus/lib/python3.11/site-packages/pyranges/methods/intersection.py:53: FutureWarning: In a future version, df.iloc[:, i] = newvals
will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either df[df.columns[i]] = newvals
or, if columns are non-unique, df.isetitem(i, newvals)
scdf.loc[:, "End"] = new_ends
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[75], line 2
1 from scenicplus.plotting.coverageplot import coverage_plot
----> 2 scenicplus.plotting.coverageplot.coverage_plot(
3 scplus_obj,
4 bw_dict=bw_dict,
5 region='chr14:100725892-100739224',
6 meta_data_key='broader_annotation',
7 pr_consensus_bed=pr_consensus_bed,
8 pr_gtf=pr_annotation,
9 genes_violin_plot='DLK1'
10 )
File ~/.conda/envs/scenicplus/lib/python3.11/site-packages/scenicplus/plotting/coverageplot.py:288, in coverage_plot(SCENICPLUS_obj, bw_dict, region, genes_violin_plot, genes_arcs, gene_height, exon_height, meta_data_key, pr_consensus_bed, region_bed_height, pr_gtf, pr_interact, bw_ymax, color_dict, cmap, plot_order, figsize, fontsize_dict, gene_label_offset, arc_rad, arc_lw, cmap_violinplots, violinplots_means_color, violinplots_edge_color, violoinplots_alpha, width_ratios_dict, height_ratios_dict, sort_vln_plots, add_custom_ax)
283 gtf_region_intersect = pr_gtf.intersect(pr_region)
284 # only keep exon and gene info
285 gtf_region_intersect = gtf_region_intersect[np.logical_and(
286 np.logical_or(gtf_region_intersect.Feature == 'gene',
287 gtf_region_intersect.Feature == 'exon'),
--> 288 gtf_region_intersect.gene_type == 'protein_coding')]
289 # iterate over all genes in intersect
290 ax = axs_bw[subplot_idx]
File ~/.conda/envs/scenicplus/lib/python3.11/site-packages/pyranges/pyranges.py:269, in PyRanges.__getattr__(self, name)
244 """Return column.
245
246 Parameters
(...)
264 Name: Start, dtype: int32
265 """
267 from pyranges.methods.attr import _getattr
--> 269 return _getattr(self, name)
File ~/.conda/envs/scenicplus/lib/python3.11/site-packages/pyranges/methods/attr.py:67, in _getattr(self, name)
65 return pd.concat([df[name] for df in self.values()])
66 else:
---> 67 raise AttributeError("PyRanges object has no attribute", name)
AttributeError: ('PyRanges object has no attribute', 'gene_type')