Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading files from TRUST4 #415

Open
Sa753 opened this issue Sep 9, 2024 · 1 comment
Open

Error loading files from TRUST4 #415

Sa753 opened this issue Sep 9, 2024 · 1 comment

Comments

@Sa753
Copy link

Sa753 commented Sep 9, 2024

I am loading Trust4_report.tsv file using repLoad from immunarch with no error. But the error happens when I try the following:

I subset the original Trust4_report.tsv file into separate TCR and BCR report.tsv files then save each one separately. I then load the BCR_report.tsv which has 28,000 rows and 10 columns with no problem but I get the error below when I load the TCR_report.tsv file which is around 3000 rows and 10 columns inspite that both are generated and saved in the same way.

== Step 1/3: loading repertoire files... ==

Processing "" ...
-- [1/1] Parsing "~/tcr_report.tsv" -- vdjtools
Error in $<-:
! Assigned data df[[.dstart]] - df[[.vend]] - 1 must be compatible with
existing data.
✖ Existing data has 3798 rows.
✖ Assigned data has 0 rows.
ℹ Only vectors of size 1 are recycled.
Caused by error in vectbl_recycle_rhs_rows():
! Can't recycle input of size 0 to size 3798.
Run rlang::last_trace() to see where the error occurred.

#load the cdr3 file
cdr3 <- read.table(file = "~/trust4_report_files/Trust4_report.tsv", header = T, stringsAsFactors = F)
#subset the tcr and bcr files
cdr3.bcr <- subset(cdr3, grepl("^IG",V) | grepl("^IG",J) | grepl("^IG",C))
cdr3.tcr <- subset(cdr3, grepl("^TR",V) | grepl("^TR",J) | grepl("^TR",C))
#save the tcr and bcr file

write_tsv(cdr3.bcr, file='~/bcr_report.tsv', col_names = T)

write_tsv(cdr3.tcr, file='~/tcr_report.tsv', col_names = T)

load parsed file using immuarch

immdata <- repLoad('~/bcr_report.tsv') # successful no issues

immdata <- repLoad('~/tcr_report.tsv') # error mentioned above and no loading.

I am using R 4.3 and immunarch 0.9.1

Please advise

Thank you

@Sa753
Copy link
Author

Sa753 commented Sep 9, 2024

I am aware that there was a fix for this error but don't know why this is temperamental, i.e work with some files and not with others produced in the same way. so please don't direct me to the previous issue, I am aware of it and tried it but did not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant