immunarch
immunarch copied to clipboard
support for TRUST4 output
Hello,
Is there a way that I can load data output from TRUST4 into Immunarch?
Thanks, Nadia
There is a bug on detecting vdjtools format.
I believe that the problem is on the file io.R
, line 546:
} else if (str_detect(tolower(l), "cdr3nt") && str_detect(tolower(l), "vend") && str_detect(tolower(l), "v")) {
According to the VDJTools documentation, only the columns 1 to 7 are required, which means that the column Vend
shouldn't be used to recognize the vdjtools file.
@natallah, on your file created by TRUST4 sample_report.tsv
, remove the character #
from the beginning and add a new column: Vend
with NA values, if you don't already have it. It worked for me.
Fabulous @adefelicibus - thank you SO much!
There is a bug on detecting vdjtools format.
I believe that the problem is on the file
io.R
, line 546:} else if (str_detect(tolower(l), "cdr3nt") && str_detect(tolower(l), "vend") && str_detect(tolower(l), "v")) {
According to the VDJTools documentation, only the columns 1 to 7 are required, which means that the column
Vend
shouldn't be used to recognize the vdjtools file.@natallah, on your file created by TRUST4
sample_report.tsv
, remove the character#
from the beginning and add a new column:Vend
with NA values, if you don't already have it. It worked for me.
Which version do you use? Version 0.6.5 doesn't work for me even I follow your suggestions. The vdjtools parser seems to assume an 11-columns vdjtools format.
There is a bug on detecting vdjtools format.
I believe that the problem is on the file
io.R
, line 546:} else if (str_detect(tolower(l), "cdr3nt") && str_detect(tolower(l), "vend") && str_detect(tolower(l), "v")) {
According to the VDJTools documentation, only the columns 1 to 7 are required, which means that the column
Vend
shouldn't be used to recognize the vdjtools file.@natallah, on your file created by TRUST4
sample_report.tsv
, remove the character#
from the beginning and add a new column:Vend
with NA values, if you don't already have it. It worked for me.
Hi, I've installed the lastest version on the master branch. But the trick did not work for me, too. the error message is
Error: Assigned data `df[[.dstart]] - df[[.vend]] - 1` must be compatible with existing data.
It looks like some extra effort are needed.
Hi, @ddzhang3 and @zqfang! My name is Aleksandr Popov, I am a developer of the Immunarch package. Thank you for using our software!
Could you, please, provide examples of files that cannot be loaded to Immunarch? It will help to update the parser.
Best regards, Aleksandr
@Alexander230 , sounds great ! I've attached 2 output of TRUST4. TRUST4.zip
Thank you very much for providing the data! I've made a fix; you can try it by installing Immunarch from Github branch with the fix:
devtools::install_github("immunomind/immunarch", ref="trust4-fix")
Soon I plan to merge it into development branch of Immunarch.
Best regards, Aleksandr
@Alexander230 , That's fantastic ! It works perfect now.
There's still one issue:
When only header line presents (without any clonetypes data), it throws error
Error in if (any(str_detect(.name[i], c("TCRA", "TRAV", "TCRG", "TRGV", :
missing value where TRUE/FALSE needed
When I parse a directory of many results, the parse stop because of the empty file.
Would you mind skipping the file without any clonetypes and warning for the user ?
@zqfang , please try to reinstall Immunarch again from trust4-fix
branch; I've made an update to handle empty files better. It will display warnings that type of recombination (VJ/VDJ) cannot be detected, but will not stop with error.
Best regards, Aleksandr
@Alexander230 , it works perfect now. Thank you very much for quick response
@Alexander230 I install the trust-fix version of immunarch. But I found that when i plot the geneusage, it will plot all the genes. For example,
imm_gu <- geneUsage(immdata$data[c(1, 2)], "hs.ighj", .norm = F, .ambig = 'inc')
vis(imm_gu)
geneUsage(immdata$data[c(1, 2)], "hs.trbv", .norm = F, .ambig = 'inc')
Thanks for your reply~
Hello I just recently starrted ImmuneArch on TRUST4 results from Bulk RNA-seq and I get the same problem, when using geneUsage, despite selecting specific genes it plots all of them? Is there a way to fix it? Thank you.
Hello, @weizhiting and @Cinade!
Immunarch's geneUsage()
function now selects all V or D or J genes depending on .gene
argument value, not a specific gene. We plan to improve the functionality of geneUsage()
in future versions of Immunarch.
For now, you can select only the genes that you need from geneUsage()
output before visualization, for example,
imm_gu <- geneUsage(immdata$data[c(1, 2)], .gene="hs.trbj", .norm = F, .ambig = 'inc')
vis(imm_gu[imm_gu[["Names"]] %in% c("TRBJ1-2", "TRBJ1-3"), ])
If you have more questions, feel free to ask them!
Best regards, Aleksandr
Thank you very much. it work for me.
Closing this issue for now. The next version of Immunarch will mostly support the AIRR Standard data format.
More details on the next version of Immunarch are here: https://b-t.cr/t/immunarch-will-significantly-evolve-but-it-will-break-things-and-we-need-your-help/1123