Teichlab / bracer

BraCeR - reconstruction of B cell receptor sequences from single-cell RNAseq data
Other
40 stars 22 forks source link

graphviz error #51

Closed tAndreani closed 4 years ago

tAndreani commented 4 years ago

Hello,

I would like to infer the lineage tree of my clones (around 140 single B-cells). I have tried to run the summarize command and infer the lineage like:

 bracer summarise --graph_format bmp --IGH_networks --infer_lineage output_test_my_data/

The summarized plot are presents but it failed to reconstruct the lineage and also to build the network files because the bmp format is not recognized. I have also tried jpeg but had the same problem. This is the error:


Error: /usr/lib64/graphviz/config6 is zero sized, or other read error.
Error: /usr/lib64/graphviz/config6 is zero sized, or other read error.
Format: "bmp" not recognized. Use one of:
Traceback (most recent call last):
  File "/site/ne/app/x86_64/bracer/bracer", line 21, in <module>
    launch()
  File "/site/ne/app/x86_64/bracer/bracerlib/launcher.py", line 43, in launch
    Task().run()
  File "/site/ne/app/x86_64/bracer/bracerlib/tasks.py", line 903, in run
    self.IGH_networks)
  File "/site/ne/app/x86_64/bracer/bracerlib/bracer_func.py", line 1310, in draw_network_from_cells
    subprocess.check_call(command)
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/dot', '-Gsplines=true', '-Goverlap=false', '-Gsep=0.4', '-o', '/site/ne/home/i0439277/bracer/bracer-master/output_test_our_data_cluster/filtered_BCR_summary/clonotype_network_with_identifiers.bmp', '-T', 'bmp', '/site/ne/home/i0439277/bracer/bracer-master/output_test_our_data_cluster/filtered_BCR_summary/clonotype_network_with_identifiers.dot']' returned non-zero exit status 1.

at the same time if I run the test example and i ask to summarize and draw the lineage tree using:

 bracer test -p 4 -c bracer.conf  --infer_lineage

I still have the problem of building the network and the lineage tree and this is the error


Traceback (most recent call last):
  File "/site/ne/app/x86_64/bracer/bracer", line 21, in <module>
    launch()
  File "/site/ne/app/x86_64/bracer/bracerlib/launcher.py", line 43, in launch
    Task().run()
  File "/site/ne/app/x86_64/bracer/bracerlib/tasks.py", line 2014, in run
    infer_lineage=self.infer_lineage, species='Hsap').run()
  File "/site/ne/app/x86_64/bracer/bracerlib/tasks.py", line 888, in run
    self.plot_length_distributions(self.loci, length_filename_root, cells)
  File "/site/ne/app/x86_64/bracer/bracerlib/tasks.py", line 1216, in plot_length_distributions
    sns.distplot(lns)
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/site-packages/seaborn/distributions.py", line 224, in distplot
    kdeplot(a, vertical=vertical, ax=ax, color=kde_color, **kde_kws)
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/site-packages/seaborn/distributions.py", line 657, in kdeplot
    cumulative=cumulative, **kwargs)
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/site-packages/seaborn/distributions.py", line 284, in _univariate_kdeplot
    x, y = _scipy_univariate_kde(data, bw, gridsize, cut, clip)
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/site-packages/seaborn/distributions.py", line 356, in _scipy_univariate_kde
    kde = stats.gaussian_kde(data, bw_method=bw)
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/site-packages/scipy/stats/kde.py", line 172, in __init__
    self.set_bandwidth(bw_method=bw_method)
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/site-packages/scipy/stats/kde.py", line 499, in set_bandwidth
    self._compute_covariance()
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/site-packages/scipy/stats/kde.py", line 510, in _compute_covariance
    self._data_inv_cov = linalg.inv(self._data_covariance)
  File "/site/ne/app/x86_64/python/v3.6.7/lib/python3.6/site-packages/scipy/linalg/basic.py", line 819, in inv
    raise LinAlgError("singular matrix")
numpy.linalg.linalg.LinAlgError: singular matrix

in the folder there are only these files:

bracer

What could be the problem? Any idea?

idalind commented 4 years ago

Hi! I'm not sure what the issue is, but from the traceback it seems like it could have something to do with seaborn. Seaborn depends on the module statsmodels, which if updated through other packages may cause problems in Seaborn. Could you please check if your statsmodels version is 0.8.0? If not, please try the following to uninstall statsmodels and install again:

conda uninstall statsmodels --yes conda install -c taugspurger statsmodels=0.8.0

tAndreani commented 4 years ago

Hi!

thank you for the quick reply. I have solved the problem now thanks.

Can I ask you a question about the output of --infer_lineage? What are the numbers in the edges and what are the number inside the circles? Are the first "number of sequences" and the second "number of single cells"?

In few words in this plot you provide: https://github.com/Teichlab/bracer/blob/master/test_data/expected_summary/lineage_trees/1.pdf to what correspond the numbers of 10, 22 and 17? These are shared sequences between the inferred clonotype and the cells? Or are these mutations?

..explanation is here: https://cran.r-project.org/web/packages/alakazam/vignettes/Lineage-Vignette.pdf and it seems that: "The igraph graph object will contain clone annotations as graph attributes, sequence annotations as vertex attributes, and mutations along edges as edge attributes. "

Thank you for any reply. Best