Git Product home page Git Product logo

Comments (6)

zktuong avatar zktuong commented on August 15, 2024

Hi, thank you for using the package. My apologies for the bug. I’ve picked that up and it’s has been fixed in the devel branch. Do you want to try and install from there and see if it works? The instructions to install fro the devel branch should be on the main readme.

from dandelion.

terooatt avatar terooatt commented on August 15, 2024

Thank you so much for your fast response. I believe by devel branch you meant this https://github.com/zktuong/dandelion/blob/devel/README.md but I don't see any difference. The only different thing I did now was to install sc-dandelion with the branch option pip install git+https://github.com/zktuong/dandelion.git@devel. I get a new error.

ddl.pp.calculate_threshold(vdj, manual_threshold = 0.1)
RRuntimeError Traceback (most recent call last)
/var/folders/3x/r5d2xyzx39sgl5nq6cj8fmvw0000gn/T/ipykernel_22663/3386437591.py in
----> 1 ddl.pp.calculate_threshold(vdj, manual_threshold = 0.1)

~/miniconda3/envs/dandelion/lib/python3.7/site-packages/dandelion/preprocessing/_preprocessing.py in calculate_threshold(self, mode, manual_threshold, VJthenLen, onlyHeavy, model, normalize_method, threshold_method, edge, cross, subsample, threshold_model, cutoff, sensitivity, specificity, ncpu, plot, plot_group, figsize, **kwargs)
2594 warnings.filterwarnings("ignore")
2595
-> 2596 sh = importr('shazam')
2597 pandas2ri.activate()
2598 if 'v_call_genotyped' in dat.columns:

~/miniconda3/envs/dandelion/lib/python3.7/site-packages/rpy2/robjects/packages.py in importr(name, lib_loc, robject_translations, signature_translation, suppress_messages, on_conflict, symbol_r2python, symbol_resolve, data)
482 if _package_has_namespace(name,
483 _system_file(package=name)):
--> 484 env = _get_namespace(name)
485 version = _get_namespace_version(name)[0]
486 exported_names = set(_get_namespace_exports(name))

~/miniconda3/envs/dandelion/lib/python3.7/site-packages/rpy2/rinterface_lib/conversion.py in _(*args, **kwargs)
43 def _cdata_res_to_rinterface(function):
44 def _(*args, **kwargs):
---> 45 cdata = function(*args, **kwargs)
46 # TODO: test cdata is of the expected CType
47 return _cdata_to_rinterface(cdata)

~/miniconda3/envs/dandelion/lib/python3.7/site-packages/rpy2/rinterface.py in call(self, *args, **kwargs)
678 )
679 if error_occured[0]:
--> 680 raise embedded.RRuntimeError(_rinterface._geterrmessage())
681 return res
682

RRuntimeError: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) でエラー:
‘Biostrings’ という名前のパッケージはありません

from dandelion.

zktuong avatar zktuong commented on August 15, 2024

The new error is related to shazam not installed, or rpy2 not pointing to the right R.

Can I ask where did you install the various R dependencies listed in the installation instructions?

in python, if you run this:

from rpy2.robjects.packages import importr
base = importr('base')
print(base._libPaths())

Is shazam installed in any of the libPaths?

from dandelion.

terooatt avatar terooatt commented on August 15, 2024

from rpy2.robjects.packages import importr
base = importr('base')
print(base._libPaths())

[1] "/Library/Frameworks/R.framework/Versions/4.1/Resources/library"

from dandelion.

zktuong avatar zktuong commented on August 15, 2024

ok you need to run the following in R separately:

install.packages(c("optparse", "alakazam", "tigger", "airr", "shazam"))

and note where they are installed.

when you run the rpy2 code chunk above, those R dependencies should be in the same path.

For instructions on how to install the immcantation pacakges, you can refer to

https://alakazam.readthedocs.io/en/stable/install/
https://shazam.readthedocs.io/en/stable/install/
https://tigger.readthedocs.io/en/stable/install/

If after installing and your python is still not talking to the right R, i would suggest to save your AIRR table, follow the tutorial on this page:
https://shazam.readthedocs.io/en/stable/vignettes/DistToNearest-Vignette/

and then run changeo's DefineClones.py
https://changeo.readthedocs.io/en/stable/examples/cloning.html

Then you can read the file back into dandelion for downstream processing.

To save the data as an AIRR table, you can do this:

# assuming vdj is the dandelion object
vdj.write_airr('airr_table.tsv')

Then to read the AIRR table back in:

vdj2 = ddl.Dandelion('new_airr_table.tsv')

Hopefully that makes sense.

from dandelion.

terooatt avatar terooatt commented on August 15, 2024

Thanks. I was able to install it properly and it is working ok now.

from dandelion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.