Comments (12)
Hello @majorkazer ,
can you email us a sample of your data so we can reproduce the bug please? [email protected]
Can you try running the code
j_usage = geneUsage(BCRdata.coding$data, "hs.ighj", .ambig = "inc")
and see what changed?
from immunarch.
Hi @vadimnazarov,
Thanks for your help. My dataset is huge, so I have attached a downsampled dataset here.
I tried running the code you suggested, but still get the same result as described above.
from immunarch.
Hi @majorkazer ,
it seems that everything works OK on that version of immunarch:
Do you have the tcR
package installed? Can you remove both tcR
and immunarch
packages and install immunarch
(only!) again, and try that again?
from immunarch.
ping @majorkazer
from immunarch.
Apologies for the delay.
I am running this analysis in a jupyter notebook runtime environment; I'm not sure if this may be part of the problem. I created a new notebook runtime environment and re-installed immunarch
from github using:
devtools::install_url("https://github.com/immunomind/immunarch/raw/master/immunarch.tar.gz")
I still get the same result as I reported before (see attached image from notebook).
from immunarch.
Hi @majorkazer
We run the exact code you just wrote us on your data, and got correct results for all three gene segments. Can you please run the following code and check the output:
table(BCRdata.coding$data$J.name)
table(BCRdata.coding$data$D.name)
from immunarch.
Hi,
Running either table function returns this: < table of extent 0 >
.
However, if I run table(BCRdata.coding$data$clones$D.name)
, I get what we would expect:
I don't have a way to test this locally as of right now, everything is being run on the runtime environment... I think there may be something weird going on with the environment and/or jupyter notebooks. Nevertheless, for the time being I can just use the outputs from table
to generate my own frequency plots.
Thanks for your help with this! Happy to close this issue for the time being unless you want to explore further.
from immunarch.
after brainstorming with almost the whole team we managed to reproduce this tricky bug. Can you please try
j_usage = geneUsage(BCRdata.coding$data[[1]], "hs.ighj", .norm=T, .ambig="inc")
vis(j_usage, .plot = "hist")
Note the [[1]]
for the data
.
Alternatively, you can try
j_usage = geneUsage(BCRdata.coding$data[["clones"]], "hs.ighj", .norm=T, .ambig="inc")
vis(j_usage, .plot = "hist")
from immunarch.
Success! I am able to generate the J and D frequency plots using your code.
So, out of curiosity, is this something weird with how MIXCR objects are brought in? Or a difference in the version of immunarch
that I'm using?
Thanks for your help!
from immunarch.
Perfect!
No, this is an issue in our code. geneUsage
incorrectly processes the case when there is only one repertoire in the input list of repertoires. When you pass BCRdata.coding$data
you pass a list with only one repertoire (i.e., the problematic case). When you pass BCRdata.coding$data[["clones"]]
you pass this exact repertoire, and this is the case where everything works OK. Interestingly enough, when you pass a list with two or more repertoires, everything works OK, because we have a separate branch of code that processes the case with only one repertoire, and we definitely need to improve it.
@majorkazer , thank you for bringing this very tricky and non-obvious issue to us! We will fix it in our next release, and I will close the issue then.
We are conducting short interviews with specialists about pain points in AIRR analysis. We would like to learn more about the full pipeline from laboratory work to clinical insights. The interview is also a wonderful opportunity to discuss anything related to immune repertoire analysis and how to make it in immunarch and R. Should you find it appealing, here is a link to schedule our appointment: https://calendly.com/immunomind/interview
from immunarch.
The issue was solved.
from immunarch.
Sorry to open this back up but i'm having the same problem and the [[1]] does not fix it. I don't have tcR installed and am using immunarch directly in R. My data was loaded in from mixcr and it seems that everything else works great except this function.
specifying hs.trab. or hstrbj ect all returns the same object with all clones including IGH, IGK.
using the [[1]] selects clones but it seems to be doing it in a strange way. for example hs.trav will return any clone that has a V in the name IGHV3, TRAV11, IGKV2D. Same thing with hs.trab and hs.traj
from immunarch.
Related Issues (20)
- select_()` was deprecated in dplyr 0.7.0.
- Error when generating plot for "Gini coefficient" HOT 1
- Issue with repLoad and repGermline when using O. mykiss IMGT data HOT 2
- Ambiguous Gene Usage in TRBD HOT 2
- Package Installation Error HOT 1
- Get Immunarch back to CRAN
- Number of sequence provided in .data and .dist are not matching!
- Deprecation warning from purrr in function seqCluster
- Single cell TCRSeq HOT 1
- C call with TRUST4 files HOT 2
- gene_stats for pig TRAV
- Found dataframe without required column Cluster
- How to specify groups order?
- MiXCR import no longer works HOT 4
- File naming vs loading problems HOT 2
- Cellranger Data Loading HOT 1
- object 'generate_germline_sequence' not found
- CDR3 Length paired 10x data
- Novaseq X and 10X
- dbAnnotate problems
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from immunarch.