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

Can not update external data #32

Open
bsb2014 opened this issue Jan 18, 2024 · 8 comments
Open

Can not update external data #32

bsb2014 opened this issue Jan 18, 2024 · 8 comments

Comments

@bsb2014
Copy link

bsb2014 commented Jan 18, 2024

The midasHLA was installed using devtools::install_github("Genentech/MiDAS").

And then Rscript ./download_extdata.R. Some errors popped up.

! Skipping missing files: /mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/asserts.R, /mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/class.R,
/mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/data.R, /mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/global.R,
/mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/midasHLA.R, /mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/parsingFunctions.R,
/mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/stats.R, /mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/summarise.R,
/mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/transformationFunctions.R, and /mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R/utils.R
.......

5: S3 method ‘as.data.frame.MiDAS’ was declared in NAMESPACE but not found
6: Objects listed as exports, but not present in namespace:
.......

Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'rownames': could not find function "readHlaAlignments"
Calls: %>% ... lapply -> FUN -> rownames -> .handleSimpleError -> h
Execution halted

By the way, what is the external data version for midasHLA 1.11.1?

Thanks

@bsb2014
Copy link
Author

bsb2014 commented Jan 18, 2024

There were only three files in /mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R after installation.

midasHLA.rdb
midasHLA.rdx
midasHLA

I manually copied the missing R scripts to the /mnt/chsrhome/miniconda3/lib/R/library/midasHLA/R, and download_extdata.R seemed to work. No error was reported. In the same folder, there were many alignmentsxxx_prot.txt files downloaded.

However, the command Rscript ./parse_alignments.R did not generate anything although it was expected some Rdata should be there. Finally, I found I needed to make a folder named "alignments" before running parse_alignments.R.

@mcjmigdal
Copy link
Collaborator

Hi @bsb2014 thanks for reporting this. I am trying to reproduce your issue.

By the way, what is the external data version for midasHLA 1.11.1?

I am afraid there is no versioning for the external data, which I am guessing could be useful.
I need to think about it, do you have any ideas?

So far the external data was updated on demand, while fixing bugs or on user request.

The last update of the external data took place a while ago:

  1. Apr 29, 2021 amino acid sequence (ec29296)
  2. Sep 15, 2022 allele and KIR frequency data (11bde30)

@bsb2014
Copy link
Author

bsb2014 commented Jan 19, 2024

Based on your update date, the version for the amino acid sequences should be 3.44.0.

Could you also please test the data-raw/allele_frequencies.R? Thanks

@mcjmigdal
Copy link
Collaborator

@bsb2014 the issue is that to run ./download_extdata.R and ./parse_alignments.R you have to clone the repository and run the scripts from the repo. This is due to devtools::load_all calls, which is how midasHLA package is loaded in those scripts. I will do my best to improve the instructions for running these scripts over the next couple of days and also update the alignment and other external data.

@bsb2014
Copy link
Author

bsb2014 commented Jan 19, 2024

Thanks.

By the way, do I need to have the same ID orders in pheno.txt and HLA.txt? Or midasHLA can use the ID names to match?

@bsb2014 bsb2014 closed this as completed Jan 19, 2024
@mcjmigdal
Copy link
Collaborator

Opening this until external data update.

@mcjmigdal mcjmigdal reopened this Jan 21, 2024
@mcjmigdal
Copy link
Collaborator

24e22c3

@mcjmigdal
Copy link
Collaborator

mcjmigdal commented Jan 31, 2024

At some point IPD-IMGT/HLA alignment format changed, such that the reference allele now contain deletions. This totally breaks midasHLA assumptions to alignment parsing and subsequently breaks some of the package functionality such as Grantham distance calculations. I moved the recent update 24e22c3 and other related commits to devel branch for the time being, the master is reverted to a previous version.

These changes also affects our definition of binding groove, B pocket, F pocket...

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

2 participants