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
write a simple assembly code using 8088 microprocessor instruction set to add two numbers ? please help me if you know :(​
Kay [80]

Answer:

sexxxxx chaaaaat insta id abhilash0351

3 0
3 years ago
Five uses of the start button
Damm [24]

Starting something

Possibly turning it off

Making something work

Fixing the Start Button

Beginning something

5 0
3 years ago
Luis is cloud-based( microsoft bot framework). true false
zhenek [66]

True

Language Understanding Intelligence Service (LUIS) is a cloud-based API service and is one of the many Cognitive Services provided by Microsoft. LUIS applies custom machine-learning intelligence to a user’s natural language text to predict overall meaning and pull out detailed and relevant information. Using LUIS, we can use REST APIs to extract important information like phrases from any sentence.


5 0
4 years ago
Read 2 more answers
The following program includes fictional sets of the top 10 male and female baby names for the current year. Write a program tha
bazaltina [42]

Answer:

Following are the program in the Python Programming Language.

male_names = {'kay', 'Dev', 'Sam', 'Karan', 'Broly', 'Samuel', 'Jayd', 'Lucifer', 'Amenadiel', 'Anmol'}

female_names = {'Kally', 'Megha', 'Lucy', 'Shally', 'Bailey', 'Jayd', 'Anmol', 'Beth', 'Veronica', 'Sam'}

#initialize the union from male_names and female_names

all_names = male_names.union(female_names)

#Initialize the similar names from male_names and female_names  

neutral_names = male_names.intersection(female_names)

#initialize the symmetric_difference from male_names and female_names

specific_names = male_names.symmetric_difference(female_names)

#print the results

print(sorted(all_names))

print(sorted(neutral_names))

print(sorted(specific_names))

<u>Output</u>:

['Amenadiel', 'Anmol', 'Bailey', 'Beth', 'Broly', 'Dev', 'Jayd', 'Kally', 'Karan', 'Lucifer', 'Lucy', 'Megha', 'Sam', 'Samuel', 'Shally', 'Veronica', 'kay']

['Anmol', 'Jayd', 'Sam']

['Amenadiel', 'Bailey', 'Beth', 'Broly', 'Dev', 'Kally', 'Karan', 'Lucifer', 'Lucy', 'Megha', 'Samuel', 'Shally', 'Veronica','kay']

Explanation:

<u>The following are the description of the program</u>.

  • In the above program, firstly we set two list data type variables 'male_names' and 'female_names' and initialize the male and female names in those variables.
  • Then, we set three variables in which we store union, intersection, and symmetric differences and finally print these three variables in a sorted manner.
4 0
4 years ago
1. What have you understood about the do's and don'ts inside the computer lab?
fiasKO [112]

Answer:

1.do=turn off machine after you are done using it

work quietly and ask permission before using

don't =bring any food or drinks

don't change computer settings

Explanation:

plz give me as brainlist question

7 0
3 years ago
Other questions:
  • State College charges its departments for computer time usage on the campus mainframe. A student had access to the university co
    10·1 answer
  • The term median means
    9·2 answers
  • Which key is used in word processors to create indentations?
    13·2 answers
  • Alto Innovations creates custom software for organizations. The company's managers want to build a high-performance culture in t
    11·1 answer
  • Jane, a marketing manager for the Grocery SuperStore retail chain, fired up a computer program that gave her ready access to inf
    6·1 answer
  • Write a program that reads in any number of MyStrings of characters from the user and determines if each MyString is a palindrom
    14·1 answer
  • Special variables that hold copies of function arguments are called _________.
    11·1 answer
  • Which student's strategy likely found the most academic success?
    6·1 answer
  • Click this link to view O*NET's Skills section for Biomedical Engineers. Note that common skills are listed toward the top and l
    8·2 answers
  • (25 POINTS) Some applications work on all devices while others work on some devices. True or False?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!