1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vovangra [49]
3 years ago
14

1. Extract title Write a function extract_title that takes one parameter, the filename of a GenBank formatted file, and returns

a string with the title of the dataset. The title is what follows the first occurrence of the tag "TITLE" and goes all the way before the tag "JOURNAL". Be aware that the title might extend in more than one lines; i

Computers and Technology
1 answer:
trapecia [35]3 years ago
6 0

Answer:

def extract_title(file):

   import re

   a =''

   with open(file,'r') as file:

       for line in file:

           a += line

       m = re.search("^(TITLE)(.*?)(JOURNAL)", a, re.M + re.S)

       print(m.groups()[1])

extract_title('new.txt')

Explanation:

The programming language used is python 3.

The function is first defined and the regular expression module is imported.

A variable is initialized to an empty string that will hold the content of the GenBank formatted file.

The file is opened and every line in the file is assigned to the string variable. The WITH statement allows files to be closed automatically.

Regular expression is used to capture all the files between TITLE and JOURNAL in a group.

The group is printed and the function is called.

I have attached a picture of the code in action.

You might be interested in
With modeling and simulation, we model the system and then test the ______________ to gather test predictions.
Kobotan [32]

Answer:

With modeling and simulation, we model the system and then test the system to gather test predictions.

Explanation:

You would have to test the system in order to see if it's working right and everything is all good with the system.

I hope this helped. I am sorry if you get this wrong.

4 0
3 years ago
_______ refers to the use of gps or rfid technology to create virtual boundaries that enable software to trigger a response when
ludmilkaskok [199]

Geofencing Marketing refers to the use of gps or rfid technology to create virtual boundaries that enable software to trigger a response when a mobile device enters or leaves a particular area.

<h3>What is Geofencing Marketing?</h3>
  • Geofencing marketing is an illustration of a real-time location-based trade tactic that utilizes geolocation data to mark users within a specified geographic region and delivers a range based on where they are or in what areas they have previously visited.
  • Geofencing marketing concerns setting up virtual borders around a point or area that tracks whenever someone with a portable device crosses them.

To learn more about Geofencing Marketing, refer:

brainly.com/question/9795929

#SPJ4

4 0
1 year ago
Each modern computer system is equipped with a compiler. ___ .
oksano4ka [1.4K]
False, modern computers don't need to compile direct source code from users. There are DUIs (direct user interface) that allows the user to interact with a computer without coding.
6 0
3 years ago
Read 2 more answers
What does flexibility look like within your learning? Relevancy of Flexibility: Why is this important to your students?
Yakvenalex [24]

Answer:

just look like I they legs and hope they don't pop off

7 0
3 years ago
Write a code to load Shepp Logan phantoms and use the radon transform for parallel beam to generate a sinogram for 360 degree ro
jeyben [28]
他們也在週四在家休息時間接受媒體訪問時指出,他們
6 0
2 years ago
Other questions:
  • Chris has just graduated from high school. He hopes to complete a carpenter's apprenticeship and eventually open his own busines
    9·2 answers
  • One type of technology that can verify a person's identity is _____.
    6·2 answers
  • What are the core scripting and coding technolies used to build ai platforms?
    14·1 answer
  • Jeremy is designing a website for a florist. He intends to discuss the web design with his client. Which tool should Jeremy use
    6·1 answer
  • Quinton is having trouble learning Spanish because he keeps reverting back to the grammatical structures of his native English l
    6·1 answer
  • To view the results of a query, open it by pressing and holding or right-clicking the query in the navigation pane and tapping o
    10·1 answer
  • In 2009 to 2010, 1 in 10 social network users:
    10·1 answer
  • 6. Python indexes lists beginning with the number 1.<br> True<br><br> False
    15·1 answer
  • What is the purpose of the website directory provided by the website host?
    5·1 answer
  • What is a hardware device that allows you to connect to several computers and other devices to a single internet connection
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!