add gene annotation to midas_merge_snps #46
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR, we added the gene annotation of representative genome for given
{species_id}
to the midas_merge_snps workflow. To be specific, four columns were added to the one of the output file:{species_id}.snps_info.tsv
:locus_type
: IGR, CDS, tRNA and etcsite_type
: degeneracyamino_acids
: amino acids encoded by 4 possible allelesWe also added a subcommand
build_gene_features
to convert the Prokka GFF format into genes features desired by MIDAS . For each genome, the generated output is saved ins3://microbiome-igg/2.0/genes_annotations/{species_id}/{genome_id}.genes}. The
build_gene_featurescommand can be merge into
annotate_genes` issue 45.For a given genomic position, in order to locate the gene carrying that position, we first converted the list of gene ranges into a list of half-open gene boundaries, and used binary search to find the range that given position fell into. If return even index, then the given position fell between two genes, return "IGR"; if return odd, then the given position fell within one gene, return corresponding
gene_type
as thelocus_type
.Passed the unit test.