Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7864983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:57:05+00:00 2026-06-02T23:57:05+00:00

Now, I need to find a way in which Python can find the codon

  • 0

Now, I need to find a way in which Python can find the codon position number 5 of the above code and extract that sequence until position 12 (ATGG*CTTTACCTCGTC*TCACAGGAG). So the output should be something like this:

>CCODE1112_5..11
 CTTTACCTCGTC

How can I tell python to get the begin value after the first “_” and the end value after “..” so it can do it automatically? ? THANKS!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:57:06+00:00Added an answer on June 2, 2026 at 11:57 pm
    def extractseq( queryseq , begin=5, end =12):
       queryseq=queryseq.split('\n')#transform the string in a list of lines included in the string
    
       return queryseq[1][begin-1:end-1]
    

    I think this function should work, beware of the index which begin at 0 in python

    after written that in your script you just have to call the function subs=extractseq(seq,5,12)

    ok sorry so if you want to extract the 5 and the 12 included in the substring one way to do that easly is:

    substring=queryseq.split('\n')[0].split('_')[1].split('...')#extraction of the substring
    begin=substring[0]
    end = substring[1]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application i need to find which ios device is being used. Now
I haven't done much multithreading before and now find the need to do some
So I have this code in python that writes some values to a Dictionary
I need to write some code that deals with generating and manipulating multivariable polynomials.
I need to find a way to obtain the geometry suitable to pass to
So right now i need to create and implement an extension of the Python
I need to find a way of how to fill whole cover page with
I've wrote a python script that need to pass millions of items to a
Which is the best way to find out whether the division of two numbers
I need a select from table which does not have column that tells when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.