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

Using IGoR for species not supplied #31

Open zacmon opened 5 years ago

zacmon commented 5 years ago

Hi Quentin,

In your docs, you stated in the third paragraph of Advanced Usage:

Note that changing the GeneChoice realizations can be done automatically (without manually editing the recombination parameter file) by supplying the desired set of genomic templates to IGoR using the -set_genomic command. This could be used e.g to define a model for a chain in a species for which IGoR does not supply a model starting from of model for this chain from another species.

What exactly do you mean in the last sentence? It's unclear. Do you mean, perhaps, that the commands I've written below would allow for model_parms.txt and the like to be produced for a new species?

Example bash script template and IGoR commands

We first set up a convenient variable for setting all the genomic options.

genomeDirectory=/path/to/genomeInformationForNewSpecies
setCustomGenome="-set_genomic --V ${genomeDirectory}genomicVs.fasta\
                -set_genomic --D ${genomeDirectory}genomicDs.fasta\
                -set_genomic --J ${genomeDirectory}genomicJs.fasta\
                -set_CDR3_anchors --V ${genomeDirectory}V_gene_CDR3_anchors.csv\
                -set_CDR3_anchors --J ${genomeDirectory}J_gene_CDR3_anchors.csv"

We then run IGoR employing these options.

igor -set_wd workingDirectory -batch batchName -read_seqs inputFile
igor -set_wd workingDirectory $setCustomGenome -batch batchName -align --all
igor -set_wd workingDirectory $setCustomGenome -species human\
 -chain heavy_naive -batch batchName -infer -output --scenarios 10 --Pgen

We initialize a model for the new species from another (predefined) species, here the human model in IGoR.

Recommendations for inference options

For a new species, what do you recommend be the options for N_iter and L_thresh in the inference stage? Currently, N_iter defaults to five and my Pgen values are mostly NaNs. Would increase N_iter improve this as well as manipulating L_thresh?

qmarcou commented 5 years ago

Hi @zacmontague ,

What exactly do you mean in the last sentence? It's unclear. Do you mean, perhaps, that the commands I've written below would allow for model_parms.txt and the like to be produced for a new species?

This is indeed what I mean: provided you want to create for new species (e.g a platypus) a recombination model with the same topology than an existing model (say e.g human heavy chain), the commands you have used will create the correct model_parms and marginals files with the custom (platypus) genomic templates you have provided

As for your second question about inference parameters:

However in as explained in #28 the most likely reason for your NaNs come from alignment quality and I strongly encourage you to read my answer for that issue.