Hello! Is there a way to specify a different refer...
# hlatyping
r
Hello! Is there a way to specify a different reference fasta? Looking at the params page it seems only igenomes is supported? https://nf-co.re/hlatyping/2.1.0/parameters
m
No way we cannot use the params to overwrite
If not, let's fix this
r
hmm is the fasta completely fixed from the assets folder: https://github.com/nf-core/hlatyping/blob/7d27f7ea1c64ddcb93f70db05bc263e89a67299f/workflows/hlatyping.nf#L111? @Jonas S / @Christopher Mohr?
also are we indexing per read set?
j
For sure you can parameterize this. We should also update the reference as mentioned https://github.com/nf-core/hlatyping/issues/197
If you have time for that, please go ahead. Regarding indexing @Christopher Mohr should know better.
r
ok I will see if I can parameterize this for a start. Not sure I have the knowledge to change the reference
c
Hi all, unfortunately it is not that trivial to update the reference since these reference sequences were (partially) reconstructed/inferred as also described in the paper:
Copy code
2.1 Reference construction from phylogenetic information

HLA nucleotide coding DNA sequences (CDS), genomic nucleotide sequences and feature annotation for all HLA-I alleles have been obtained from the IMGT/HLA database [Release 3.14.0, July 2013 (Robinson et al., 2013)] for read mapping reference sequence construction.
Reference sequences for RNA-Seq data were built by concatenating exon 2 and 3 coding sequences, which were available for all alleles in the database. Mapping DNA sequencing data, however, required taking the intron sequences flanking exons 2 and 3 into consideration as well, despite the fact that they were not available for the majority of HLA alleles. To this end, OptiType uses reconstructed intron sequences for partially sequenced alleles. We impute the missing sequence data by replacing it with its closest neighbor with respect to sequence similarity from among the complete allele sequences. The procedure, therefore, attempts to reconstruct partial allele sequences based on their closest phylogenetic relatives with known intron sequences, using the fact that intronic variability in HLA is characterized by highly systematic mutations reflecting the ancestral lineage of the alleles (Blasczyk et al., 1997).
Could be that the data situation changed since then but I'm not sure. ~ 1.5 years ago, I also looked into making the reference generation part of the pipeline or at least reusing it to create a new reference version but gave up at some point.
j
Thanks @Christopher Mohr, if you could share the scripts that created these references, one could maybe help updating the references
c
Well if I had the script I could probably also do it. 😉
This was done by a former colleague and I guess this summarizes the issue:
Copy code
we lift over intron sequences from the most similar alleles. Updating them yourself would be difficult as there's a lot of sanity checking and some manual work in this process, but we're making a more-or-less automated pipeline to do it. We won't update the database for the current OptiType version, but the coming-soon OT2 (with Class II typing) will have the most recent one and we'll keep updating it.
Unfortunately, OT2 has never been released. At least I have not heard anything about it for a while.
j
Andras right? I’ll ask him. He is running around in our building drevil
👍 1
r
If we can't customize the fasta file, can we store the index and not recompute it every time?
j
I found the related issue and the function building the reference: https://github.com/FRED-2/OptiType/issues/112