qmarcou / IGoR

IGoR is a C++ software designed to infer V(D)J recombination related processes from sequencing data. Find full documentation at:
https://qmarcou.github.io/IGoR/
GNU General Public License v3.0
47 stars 25 forks source link

CDR3 anchors information and other models/ref_genome information #29

Open zacmon opened 5 years ago

zacmon commented 5 years ago

Hi Quentin,

How did you obtain the indices of where the anchor index is for the J and V genes in your models? Is there implementation or a feature in IGoR so that it can do this? If not, what was the method you used? IMGT doesn't appear to contain the anchor indices information.

Additionally, what was the process in deciding which genes would be used and which would not be used? For example, let's consider the information in models/human/bcr_heavy/ref_genome. I am attempting to see where you got these values from using IMGT, specifically the hyperlinks in the table, which is two-thirds down the page, available at http://www.imgt.org/vquest/refseqh.html. F+ORF+all P IGHV Human has 477 sequences (http://www.imgt.org/genedb/GENElect?query=7.2+IGHV&species=Homo+sapiens). Your genomicVs.fasta file in the igor_1-3-0/models/human/bcr_heavy/ref_genome directory has only 97. Why is it so small compared to the IGMT files? Were those the only ones available at the time?

Thanks, Zach

qmarcou commented 5 years ago

Hi Zach, Sorry for the late reply I was away with very limited access to the internet...

About the gene anchor indices

They are obtained via the IMGT gapped alignments (they are aligned regarding a conserved cystein/tryptophan/phenylalanin). If I remember correctly the index is given in the fasta header for each sequence (or an index that allows you to compute it). There is currently nothing in IGoR to extract it automatically but it is a rather straightforward script to code. Alternatively one could multialign all the genomic sequences in order to identify these conserved residues and extract the indices for species not present on IMGT. I had drafted a piece of code to perform this, it should be somewhere in the pygor codebase.

About the BCRs genomic templates

In general I have tried to include text files along with the models to give the reference from which the model has been taken from. Such text file should sit in the same model's folder. For BCRs the model comes from the IGoR paper [1]. As stated in the SI of the paper I used custom genomic templates from [2]. Only templates found in the individual were kept so as to characterize correctly somatic hypermutations.

tdw1221 commented 4 years ago

I'm having the same problem with TCR. Since the Vgene list shipped with iGOR does not have some of the genes in my data, I was hoping to use the latest TRBV fasta from IMGT, however i did not find the anchor position in header. Could you please give us a more detailed instruction on obtaining anchor? Thank you very much


Hi Quentin,

How did you obtain the indices of where the anchor index is for the J and V genes in your models? Is there implementation or a feature in IGoR so that it can do this? If not, what was the method you used? IMGT doesn't appear to contain the anchor indices information.

Additionally, what was the process in deciding which genes would be used and which would not be used? For example, let's consider the information in models/human/bcr_heavy/ref_genome. I am attempting to see where you got these values from using IMGT, specifically the hyperlinks in the table, which is two-thirds down the page, available at http://www.imgt.org/vquest/refseqh.html. F+ORF+all P IGHV Human has 477 sequences (http://www.imgt.org/genedb/GENElect?query=7.2+IGHV&species=Homo+sapiens). Your genomicVs.fasta file in the igor_1-3-0/models/human/bcr_heavy/ref_genome directory has only 97. Why is it so small compared to the IGMT files? Were those the only ones available at the time?

Thanks, Zach

zacmon commented 4 years ago

Hi,

You can get the anchors by taking the number 309 and subtracting the gaps from this number. See here for a reference of the anchor indices.

For instance, take TRBV101. `>L36092|TRBV101|Homo sapiens|P|V-REGION|91723..92006|284 nt|1| | | | |284+42=326| | |`

The number of gaps is 42. So 309-42 = 267.

Another example: >M13550|TRBV7-3*05|Homo sapiens|(F)|V-REGION|1..231|231 nt|1| | | | |231+90=321|partial in 5'| | The number of gaps is 90. so 309-90 = 219. And that's the number given in the table in the SONIA link.

Hope that helps.

tdw1221 commented 4 years ago

Hi,

You can get the anchors by taking the number 309 and subtracting the gaps from this number. See here for a reference of the anchor indices.

For instance, take TRBV101. `>L36092|TRBV101|Homo sapiens|P|V-REGION|91723..92006|284 nt|1| | | | |284+42=326| | |`

The number of gaps is 42. So 309-42 = 267.

Another example: >M13550|TRBV7-3*05|Homo sapiens|(F)|V-REGION|1..231|231 nt|1| | | | |231+90=321|partial in 5'| | The number of gaps is 90. so 309-90 = 219. And that's the number given in the table in the SONIA link.

Hope that helps.

Thanks for the reply, one last question: I noticed that the default iGOR V/J anchor files have different formats compared to the SONIA ones, the latter only has 3 fields while the iGOR one has many other information like species.

I wonder can I used them interchangeably?

zacmon commented 4 years ago

You can't use them interchangeably. I'm not sure what's going on in the T cell anchor csvs, but in the B cell one there are two fields separated by a semi-colon. It needs to be in this format. It will not work otherwise. I can't speak to using IGoR for T cells since I've used it for B cells only. I assume it needs to be in this format though and can't imagine why it wouldn't be otherwise.