Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having location field in genes #11

Closed
camilogarciabotero opened this issue Jul 18, 2023 · 3 comments
Closed

Having location field in genes #11

camilogarciabotero opened this issue Jul 18, 2023 · 3 comments

Comments

@camilogarciabotero
Copy link
Member

camilogarciabotero commented Jul 18, 2023

Hi all

This package is so great! I was wondering if there is any way to fetch the location out of the gbk.genes field. Currently we can get all the fields that start with the / in the record:

gbk.genes[end]

     CDS             47738..47944
                     /db_xref="GeneID:2703534"
                     /locus_tag="lambdap79"
                     /codon_start=1
                     /transl_table=11
                     /product="hypothetical protein"
                     /protein_id="NP_597782.1"
                     /translation="MNKEQSADDPSVDLIRVKNMLNSTISMSYPDVVIACIEHKVSLE
                     AFRAIEAALVKHDNNMKDYSLVVD"
                     /note="Predicted by GeneMark"

I want to be able to get the location qualifier 47738..47944 encoded later as a UnitRange{Int64} --> 47738:47944. Is this a feature we can have in GenomicAnnotations (or already have)?

Best.

@kdyrhage
Copy link
Member

kdyrhage commented Sep 1, 2023

You can use locus(gene).position to extract the position as a UnitRange. I'll consider adding an easier way to extract the position in a later version.

@kdyrhage kdyrhage closed this as completed Sep 1, 2023
@camilogarciabotero
Copy link
Member Author

@kdyrhage
Copy link
Member

kdyrhage commented Jan 3, 2024

I've added position(gene) as a shorthand for locus(gene).position, and a section in the README about how to access the genomic position of a gene.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants