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
[20 pts] Assume that Bob wants to send a secret message to Alice using RSA encryption. (a) [5pts] (Key generation step) Assume A
Kitty [74]

Answer:

a)Yes Alice can pick 11 has value for her public exponent e

b) The value of d when the public exponent e = 3 is 37

c) The cipher c of the Bob’s message m =2 is 8

d) The cipher c of the Bob’s message m =3 is 18

e) The value of m if c = 3  and the public exponent e = 7 is 16

Explanation:

Find attached the explanation

3 0
3 years ago
Need answer ASAP
Mnenie [13.5K]

Answer:

c is the correct awnser ( to code and test )

6 0
3 years ago
Read 2 more answers
List four reasons of meaningful use that demonstrate the capabilities and processes required for the provider to show active use
Naily [24]

<span>1.       </span>Improve quality of care and reduce health disparities.

<span>2.       </span>Read the orders in the medical record and make sure to read it back again to verify accuracy.

<span>3.       </span>Maintain the security and privacy of patient health information.

<span>4.       </span>Talk to the patients and families in management of their health care.






7 0
3 years ago
A disciplined, creative, and effective approach to problem solving is needed for project success. The nine-step approach to prob
KatRina [158]

Answer: Determine the most popular solution.

Explanation:

Some of the approaches to problem solving that are listed here include:

• Gather data and verify the most likely causes.

• Revise the project plan.

• Evaluate the alternative solutions

To solve a problem, one needs to gather the data and verify the likely causes of the problem. This can be done by asking questions, running test, interviewing people, running tests, reading reports, or analyzing data.

The project plan can also be revised. Likewise, when one comes with different solutions, one should weigh the cost and benefits of each in order to choose the best solution.

Determine the most popular solution isn't a correct option.

6 0
3 years ago
Select the statement that best describes the function of the cell wall. O it gives shape to plants cells. O it produces food fro
Maslowich
It’s jelly like fluid surrounds the nucleus
8 0
3 years ago
Other questions:
  • If you define CSS rules on a parent control, the rules will be inherited by all of the children widgets.
    12·1 answer
  • PLEASE HELP!!!!! MUCH OBLIGED!!!!
    15·1 answer
  • You need to find out how much ram is installed in a system. what command do you execute to launch the system information utility
    12·1 answer
  • The equation x + y2-4x+2y=b describes a circle.
    8·1 answer
  • What is a win-win situation?
    5·1 answer
  • To create a pull quote, how should a user format the text?
    6·2 answers
  • A look to different section of the same page is known as_____.
    7·1 answer
  • What was used to enhance silent films of the early 1900s
    15·1 answer
  • I get such an error when I turn on the computer, how can I fix it?
    7·1 answer
  • Which of the following tools helps ensure your document will open in older versions of word
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!