Write a program that will open a blastn

Assignment Help Database Management System
Reference no: EM13545981

Question 1:

Your task is to write a GFF3 feature exporter. A user should be able to run your script like this:

$ export_gff3_feature.py --source_gff=/path/to/some.gff3 --type=gene --attribute=ID
--value=YAR003W

There are 4 arguments here that correspond to values in the GFF3 columns. In this case, your script should read the path to a GFF3 file, find any gene (column 3) which has an ID=YAR003W (column 9). When it finds this, it should use the coordinates for that feature (columns 4, 5 and 7) and the FASTA sequence at the end of the document to return its FASTA sequence.

Your script should work regardless of the parameter values passed, warning the user if no features were found that matched their query. (It should also check and warn if more than one feature matches the query.)

The output should just be printed on STDOUT (no writing to a file is necessary.) It should have a header which matches their query, like this:

>gene:ID:YAR003W
.... sequence here ...

Some bonus points will be awarded if you format the sequence portion of the FASTA output as 60-characters per line, which follows the standard.

Provide the complete source code AND the output of the program as it runs. You should do test runs with 3 features which are present in the file and 1 where you intentionally enter a feature NOT present in the file. Your script should handle this gracefully.

QUESTION 2:

Write a program that will open a BLASTN (nucleotide to nucleotide search) output file, parse out specific information, and produce formatted output that will be written to STDOUT (i.e. Standard Output; the terminal window / command line). Before writing your program, copy the BLASTP output file, /home/jorvis1/example_blast.txt to your home directory. Look through the file and explore the format.

Your program should start by opening the input file (you may hardcode the filename in this case), parsing and storing both the query sequence ID (from near the top of the file; look for the string following "Query=") and the query length (found on the line below the query sequence), and displaying them both to STDOUT. Add some additional characters and formatting to your output such that these two fields appear exactly like this in STDOUT:

 

Then, it is time to parse information about the significant alignments for this query. Each alignment begins with the ">" symbol. For just the first ten hits, parse out only the accession (located between the first set of pipe symbols, | | ), length and score. For each of these hits, these three fields should then be written to STDOUT in exactly this format including capitalization, spacing, and punctuation (as shown here using the real values for the first hit; study the file to understand exactly where these values came from):

Alignment #1: Accession = ref|XM_005094338.1| (Length = 2377, Score = 1098)

You must use regular expressions to pull out precisely the parts of the file that you want, which is the definition of parsing. Hint: you will very likely need to use parentheses to put some parts of those expressions into temporary memory (m.group(1), etc.) for later use.

Do not have your regular expression search for hardcoded values; your program should be able to read another BLASTN output file and run successfully, not just this specific one.

Pay careful attention to the exact appearance of the sample output, above. Although it is a good start to be able to, at a minimum, report the requested values, your program must also strive to match the formats specified.

Provide the complete source code AND the output of the program as it runs.

Reference no: EM13545981

Questions Cloud

What is approximate coefficient of restitution for collision : A 5-kg object moving with a velocity of 4m/s colides head on with a 10-kg object moving towards it at -3m/s. If the 10-kg object stops dead after the collision, what is the approximate coefficient of restitution for this collision
State the rate law for the reaction : The reaction of t-butyl bromide (CH3)3CBr with water to make t-butyl alcohol (CH3)3COH proceeds according to the following steps: write the rate law for the reaction
Calculate what is the moment of inertia of the pulley : A string is wrapped around a pulley with a radius of 2.0cm. The pulley is initally at rest. What is the moment of inertia of the pulley
Determine the kinetic energy of ball at its highest point : A 47.0 g golf ball is driven from the tee with an initial speed of 50.0 m/s and rises to a height of 25.6 m. (a) Neglect air resistance and determine the kinetic energy of the ball at its highest point. J (b) What is its speed when it is 10.0 m below..
Write a program that will open a blastn : Write a program that will open a BLASTN nucleotide to nucleotide search output file, parse out specific information, and produce formatted output that will be written to STDOUT
Find the maximum speed of the ball during its swing : An iron ball hangs from a 21.5-m steel cable and is used in the demolition of a building at a location where the acceleration due to gravity is 9.78 m/s2. find the maximum speed of the ball during its swing
Rectangular loop of wire hangs vertically as shown in figure : A rectangular loop of wire hangs vertically as shown in the figure. A magnetic field is di- rected horizontally, perpendicular to the wire, and points out of the page at all points as rep- resented by the symbol ?.
Fundamental frequency of open organ pipe corresponds : The fundamental frequency of an open organ pipe corresponds to the B above middle C (493.9 Hz on the chromatic musical scale). The third resonance of a closed organ pipe has the same frequency. (Assume that the speed of sound in air is 343 m/s.) (a) ..
What is the coordinate of the center of mass of the stick : A thin stick is placed along the x axis so that one of its ends is at x1 = 0.00 m and the other one at x2 = 1.35 m. The stick has a non-uniform mass density ?(x) = ax b, where a = 0.349 kg/m2 and b = 0.317 kg/m. What is the coordinate of the center o..

Reviews

ska545981

8/23/2016 1:18:03 AM

Dear tutor, thanks for your reply!! i will be sending more assignments in upcoming days, thanks always for assistance..

ska545981

8/23/2016 1:17:25 AM

The program is written in MS word document which is well written program and complied perfectly while running. Thanks tutor for your quick help, i got excellent grade in Assignment and i will keep more updates in future for my upcoming homework, I would like to ask few queries regarding assignment, May i get report on program? to know more about logic and process of execution of program, i need proficient knowledge about my each course assignments, i dont want to complete my grade in just taking help, i want proficient knowledge how to course assignments are developed or completed. Thanks in advance to understand my concern, I am waiting for your reply.

Write a Review

Database Management System Questions & Answers

  Design a flowchart for a program

Design a flowchart for a program that declares an array of 10 characters. Program should count and print number of times a special character, (your choice, let say ‘a') has been found in the array.

  Part 1 - using the data items given below construct an rea

part 1 - using the data items given below construct an rea diagram entities participation cardinalities relationships.

  Write down subquery to sort result in descending order

Write down your subquery MAX_CALC_SAL. Name columns in result JOB_TITLE and JOB_TOTAL, and sort result on JOB_TOTAL in descending order.

  Explain class diagram

Explain Class diagram. Outline the main steps in developing a class diagram for a Use Case(UC).

  Brief synopsis analyzing the detailed requirements

Provide a brief synopsis analyzing the detailed requirements of your prototype database design and design a database prototype that includes diagrams, data dictionary, design decisions, limitations, etc.

  Write a two to three 2-3 page paper in which yourecommend

write a two to three 2-3 page paper in which yourecommend at least three 3 specific tasks that could be performed to

  Explain the datawarehouse and data mining concepts

There are six major types of information systems which organisations use in their operations. Discuss how these information systems support managers in their decision making role Explain the datawarehouse and data mining concepts using appropria..

  Write down a three to four 3-4 page paper in which you

a multinational tour operator agency has gained new business growth in the north american market through the use of

  Explain the life cycle of an information systems

Imagine that you run a photography printing store. Your employees have been using punch cards for time entry since you started the business.

  Summarize the difference between on-line transaction

your database has been a hit. you have been called back to the customers headquarters and they want a detailed report

  How many times the top module call each subordinate module

Select the best answer for each of the multiple choice questions below about the Structure Chart shown her

  Define set of relational schemas and identify primary keys

We want to construct a database for a world-wide package delivery company. Define a set of relational schemas and identify primary and foreign keys. Try not to include redundant schemas.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd