DiltheyLab / HLA-LA

Fast HLA type inference from whole-genome data
GNU General Public License v3.0
120 stars 40 forks source link

Add preparation of index graph to main script #50

Closed jafors closed 3 years ago

jafors commented 3 years ago

This PR mainly adds a new option --prepareGraph to HLA-LA.pl which invokes the action prepareGraph inside of the HLA_LA binary, so we don't have to call the binary ourselves. This is especially handy when using a conda package, since the binary is located at path/to/conda/opt/hla-la/bin/HLA-LA and not in the conda/bin itself.

Calling HLA-LA.pl with --prepareGraph 1 should do the job here. This works both when defining a custom graph directory as well as when using the default graph directory.

Second, I added a check for custom graph directories to handle both relative and absolute paths here.

Then, I fixed the samtools version check in findPath.pm and HLA-LA.pl according to the existing fix used in the bioconda recipe patch - this should work now for samtools 1.10+

Let me know what you think, @AlexanderDilthey, I hope this is helpful!

AlexanderDilthey commented 3 years ago

Perfect! Thank you, @jafors!